Example #1
0
 public MobileTcpRemoteClient(RemotePoint point, ITcpSocketClient client)
 {
     _client = client;
     RemotePoint = point;
     ReadStream = client.ReadStream;
     WriteStream = client.WriteStream;
 }
Example #2
0
 public TcpRemoteClient(TcpClient client)
 {
     _client = client;
     var remoteEndPoint = (IPEndPoint)_client.Client.RemoteEndPoint;
     RemotePoint = new RemotePoint(remoteEndPoint.Port, remoteEndPoint.Address.ToString());
     var stream = _client.GetStream();
     WriteStream = stream;
     ReadStream = stream;
 }
Example #3
0
 private void OnConnectionReceived(object sender, TcpSocketListenerConnectEventArgs e)
 {
     if (ConnectionReceived != null)
     {
         var remotePoint = new RemotePoint(e.SocketClient.RemotePort, e.SocketClient.RemoteAddress);
         ConnectionReceived(this,
             new ListenerConnectEventArgs(remotePoint.Address, remotePoint.Port,
                 new MobileTcpRemoteClient(remotePoint, e.SocketClient)));
     }
 }
Example #4
0
 public User Get(RemotePoint remotePoint)
 {
     return _users.Values.FirstOrDefault(m => m.IpAddress == remotePoint.Address);
 }
Example #5
0
 public MulticastRemoteClient(RemotePoint point, Stream stream)
 {
     _stream = stream;
     WriteStream = Stream.Null;
     RemotePoint = point;
 }