Esempio n. 1
0
        public Connection(TcpClient tcpClient, Router router, MessageTypeDictionary typeDictionary)
        {
            mTcpClient = tcpClient;
            Router     = router;
            mMsgDict   = typeDictionary;

            Router.AddHandler <SetupSession>(HandleSessionSetup);
            Router.AddHandler <BadResponse>(HandleBadResponse);
            StartReading();
        }
Esempio n. 2
0
        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;
        }