Example #1
0
File: Nets.cs Project: nnoldman/FFF
 public static void SendBuffer(int msgid, byte[] data)
 {
     if (!isConnected)
     {
         return;
     }
     Frame.Packet packet = Frame.Packet.ToPacket(msgid, data);
     SendCommand(packet);
 }
Example #2
0
File: Nets.cs Project: nnoldman/FFF
 public static void send(Frame.Packet cmd)
 {
     if (!isConnected)
     {
         return;
     }
     sSerializeBuffer.SetPosition(0);
     cmd.Serialize(sSerializeBuffer);
     Instance.mSocketBase.Send(sSerializeBuffer);
 }
Example #3
0
File: Nets.cs Project: nnoldman/FFF
    public static void Send <T>(Cmd.CLIENTID msgid, T protodata) where T : ProtoBuf.IExtensible
    {
        if (!isConnected)
        {
            return;
        }
        MemoryStream stream = new MemoryStream();

        ProtoBuf.Serializer.Serialize <T>(stream, protodata);
        Frame.Packet packet = Frame.Packet.ToPacket((int)msgid, stream.ToArray());
        SendCommand(packet);
    }
Example #4
0
File: Nets.cs Project: nnoldman/FFF
    public static void SendCommand(int msgid)
    {
        if (!isConnected)
        {
            return;
        }

        if (!isConnected)
        {
            return;
        }
        Frame.Packet packet = Frame.Packet.ToPacket(msgid, null);
        SendCommand(packet);
    }