Beispiel #1
0
 public void send_proto_msg_to_client(int stype, int ctype, ProtoBuf.IExtensible msg)
 {
     Protocol_type = Protocol_Type.protocol_protobuf;
     byte[] send_bytes  = EncodeCmd.Encode_Protobuf(stype, ctype, msg);
     byte[] tcp_package = TcpPacker.Package(send_bytes);
     this.client_socket.BeginSend(tcp_package, 0, tcp_package.Length, SocketFlags.None, new AsyncCallback(this.on_send_data), this.client_socket);
 }
Beispiel #2
0
 public void send_json_msg_to_client(int stype, int ctype, string body)
 {
     Protocol_type = Protocol_Type.protocol_json;
     byte[] send_bytes  = EncodeCmd.Encode_Json(stype, ctype, body);
     byte[] tcp_package = TcpPacker.Package(send_bytes);
 }