func (c *Client) tellServError(err error) error { frame := ctrl.WebSocketControlFrame{ Type: ctrl.Msg_Sys_Err, Index: 0, Content: err.Error(), } return c.webSocket.WriteString(frame.Bytes()) }
func (c *wsClient) tellClientSetConfig(svr string) error { frame := ctrl.WebSocketControlFrame{ Type: ctrl.Msg_Set_Config, Index: 0, Content: svr, } return c.websocket.WriteString(frame.Bytes()) }
func (c *Client) telServConfig() error { frame := ctrl.WebSocketControlFrame{ Type: ctrl.Msg_Get_Config, Index: 0, Content: pConfig.LocalHostServ, } return c.webSocket.WriteString(frame.Bytes()) }