Пример #1
0
    private IEnumerator ConnectServer(string typeName)
    {
        yield return(null);

        BaseProtocolChannel channel = protocols[typeName];

        channel.Connect(ipe);
    }
Пример #2
0
    public void SendMessage(string typeName, INetworkMessage message)
    {
        BaseProtocolChannel channel = protocols[typeName];

        if (channel != null)
        {
            channel.Send(message);
        }
    }
Пример #3
0
    public void DisConnectServer(string typeName)
    {
        BaseProtocolChannel channel = protocols[typeName];

        if (channel != null)
        {
            channel.DisConnect();
        }
    }
Пример #4
0
 public void ReceiveMessage(BaseProtocolChannel channel, INetworkMessage message)
 {
     messageQueue.Enqueue(message);
 }