Ejemplo n.º 1
0
        public void Connect()
        {
            net   = new Network();
            print = new Display();
            ConnectionInfo connInfo   = new ConnectionInfo("127.0.0.1", 2222);
            Connection     newTCPConn = TCPConnection.GetConnection(connInfo);

            newTCPConn.AppendIncomingPacketHandler <Network>("Network", PrintIncomingMessage);
            newTCPConn.AppendShutdownHandler(OnConnectionClosed);
            Thread.Sleep(100);
            while (true)
            {
                ;
            }
        }