Beispiel #1
0
        public SocketCpp Accept()
        {
            AcceptPara para = new AcceptPara();

            SocketCpp.getAccept(this.socket, ref para);

            SimpleSocketException ex;

            if (para.errorCode != 0)
            {
                ex = new SimpleSocketException(
                    "Accept 发生错误, errorCode:" + para.errorCode,
                    para.errorCode);

                throw ex;
            }

            return(new SocketCpp(para.socket));
        }
Beispiel #2
0
 extern static void getAccept(uint listenSocket, ref AcceptPara para);