public Connection(TcpClient tcpClient, Router router, MessageTypeDictionary typeDictionary) { mTcpClient = tcpClient; Router = router; mMsgDict = typeDictionary; Router.AddHandler <SetupSession>(HandleSessionSetup); Router.AddHandler <BadResponse>(HandleBadResponse); StartReading(); }
public Host(IPEndPoint tcpEndPoint, IPEndPoint udpEndPoint, Router router, MessageTypeDictionary dictionary) { mTcpEndPoint = tcpEndPoint; mUdpEndPoint = udpEndPoint; mTcpListener = new TcpListener(tcpEndPoint); mUdpListener = new UdpClient(udpEndPoint); mRouter = router; mDictionary = dictionary; }