예제 #1
0
        public void Test1()
        {
            SockSessServer server = new SockSessServer();

            Loop.default_loop.Add(server);

            server.Bind(new IPEndPoint(0, 5964));
            server.Listen(100, OnAccept);

            Loop.default_loop.Run();
            Assert.Pass();
        }
예제 #2
0
파일: BaseLayer.cs 프로젝트: yonzkon/mnncs
        // SockSess Interface ==================================================================

        public SockSessServer MakeListen(IPEndPoint ep)
        {
            SockSessServer server = new SockSessServer();

            server.Bind(ep);
            server.Listen(100, OnAcceptEvent);
            server.close_event += new SockSess.SockSessDelegate(OnCloseEvent);

            if (sess_listen_event != null)
            {
                sess_listen_event(this, server);
            }

            Loop.default_loop.Add(server);
            sesstab.Add(server);
            sessstate.ListenCount++;
            return(server);
        }
예제 #3
0
 public void TestSockSessServer()
 {
     SockSessServer server = new SockSessServer();
     server.Listen(new IPEndPoint(0, 5964));
     server.accept_event += new SockSessServer.SockSessServerDelegate(AcceptEvent);
 }
예제 #4
0
파일: CoreBaseNew.cs 프로젝트: yiend/mnncs
        protected SockSessServer MakeListen(IPEndPoint ep)
        {
            SockSessServer server = new SockSessServer();
            server.Listen(ep);
            server.close_event += new SockSessDelegate(CloseEvent);
            server.accept_event += new SockSessServerDelegate(AcceptEvent);

            sess_group.Add(server);
            return server;
        }