public TCPClientHandler(TcpClient t) { theClient = t; theProcessor = new PlayerProcessor(); StreamController = new NetworkStreamProcessor(theClient.GetStream(), theProcessor.ProcessPacket); ((NetworkStreamProcessor)StreamController).StreamStatusEvent += StreamStatus; }
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); }