Exemple #1
0
 public MobileTcpRemoteClient(RemotePoint point, ITcpSocketClient client)
 {
     _client = client;
     RemotePoint = point;
     ReadStream = client.ReadStream;
     WriteStream = client.WriteStream;
 }
Exemple #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;
 }
Exemple #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)));
     }
 }
Exemple #4
0
 public User Get(RemotePoint remotePoint)
 {
     return _users.Values.FirstOrDefault(m => m.IpAddress == remotePoint.Address);
 }
Exemple #5
0
 public MulticastRemoteClient(RemotePoint point, Stream stream)
 {
     _stream = stream;
     WriteStream = Stream.Null;
     RemotePoint = point;
 }