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); }
extern static void getReceive(ref ReceivePara para, byte[] bytes);