func SendMsgWithSMsgHeader(vnetConn net.Conn, vTMsgType bsn_common.TMsgType, byMsg []byte) error { byData := bsn_msg.NewMsgWithMsgHeader(vTMsgType, byMsg) err := Send(vnetConn, byData) if err != nil { return err } return nil }
func (this *SClientUser) SendPb2Client(vTClientId TClientId, msgType bsn_msg_client_echo_server.ECmdEchoServe2Client, iMessage proto.Message) error { byMsg, err := proto.Marshal(iMessage) if err != nil { GSLog.Errorln(err) return err } byData := bsn_msg.NewMsgWithMsgHeader(bsn_common.TMsgType(msgType), byMsg) return this.Send2Client(vTClientId, byData) }