示例#1
0
        public int Receive(byte[] buffer)
        {
            ReceivePara para = new ReceivePara();

            para.socket       = this.socket;
            para.bufferLength = buffer.Length;

            SocketCpp.getReceive(ref para, buffer);

            SimpleSocketException ex;

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

                throw ex;
            }

            return(para.resultLength);
        }
示例#2
0
 extern static void getReceive(ref ReceivePara para, byte[] bytes);