예제 #1
0
 public Connection(IByteConnection c, ISerializer serializer)
 {
     this.serializer = serializer;
     this.ByteConnection = c;
     this.Received = new MessageQueue<object>();
     this.ByteConnection.Received.Subscribe(HandleReceived);
     ByteConnection.Disconnected += HandleDisconnected;
     IsAlive = true;
 }
예제 #2
0
 void HandleDisconnected(IByteConnection c)
 {
     FireDisconnected();
 }
예제 #3
0
 void HandleConnected(IByteConnection conn)
 {
     Connected.FireEventAsync(new Connection(conn, serializer));
 }