Exemplo n.º 1
0
 public TCPClientHandler(TcpClient t)
 {
     theClient        = t;
     theProcessor     = new PlayerProcessor();
     StreamController = new NetworkStreamProcessor(theClient.GetStream(), theProcessor.ProcessPacket);
     ((NetworkStreamProcessor)StreamController).StreamStatusEvent += StreamStatus;
 }
Exemplo n.º 2
0
 public Client(string playername, string password, string hostname)
 {
     PlayerName       = playername;
     PassKey          = password; //Definitely not secure ... Don't use your normal password! ;)
     theClient        = new TcpClient(hostname, 15647);
     StreamController = new NetworkStreamProcessor(theClient.GetStream(), PacketProcessors.ProcessPacket);
 }