code: func NewWSConnection(baseConn *websocket.Conn, funcMap map[string]*RPCFunc,
  	logger *logging.Logger, options ...func(*wsConnection)) *wsConnection {
  	wsc := &wsConnection{
  		remoteAddr:        baseConn.RemoteAddr().String(),
  		baseConn:          baseConn,
  		funcMap:           funcMap,
  		writeWait:         defaultWSWriteWait,
  		writeChanCapacity: defaultWSWriteChanCapacity,
  		readWait:          defaultWSReadWait,
  		pingPeriod:        defaultWSPingPeriod,
  	}
  	for _, option := range options {
  		option(wsc)
  	}
  
  	wsc.BaseService = *cmn.NewBaseService(tendermint.NewLogger(logger.With("remote", baseConn.RemoteAddr())),
  		"wsConnection", wsc)
  	return wsc
  }
docs: // NewWSConnection wraps websocket.Conn.
  //
  // See the commentary on the func(*wsConnection) functions for a detailed
  // description of how to configure ping period and pong wait time. NOTE: if the
  // write buffer is full, pongs may be dropped, which may cause clients to
  // disconnect. see https://github.com/gorilla/websocket/issues/97