code: func NewWSClient(remoteAddr, endpoint string, options ...func(*WSClient)) *WSClient {
  	addr, dialer := makeHTTPDialer(remoteAddr)
  	c := &WSClient{
  		Address:              addr,
  		Dialer:               dialer,
  		Endpoint:             endpoint,
  		PingPongLatencyTimer: metrics.NewTimer(),
  
  		maxReconnectAttempts: defaultMaxReconnectAttempts,
  		readWait:             defaultReadWait,
  		writeWait:            defaultWriteWait,
  		pingPeriod:           defaultPingPeriod,
  	}
  	c.BaseService = *cmn.NewBaseService(nil, "WSClient", c)
  	for _, option := range options {
  		option(c)
  	}
  	return c
  }
docs: // NewWSClient returns a new client. See the commentary on the func(*WSClient)
  // functions for a detailed description of how to configure ping period and
  // pong wait time. The endpoint argument must begin with a `/`.