public int Send(byte[] buffer) { SendPara para = new SendPara(); para.socket = this.socket; para.bufferLength = buffer.Length; SocketCpp.getSend(ref para, buffer); SimpleSocketException ex; if (para.errorCode != 0) { ex = new SimpleSocketException( "Send 发生错误, errorCode:" + para.errorCode, para.errorCode); throw ex; } return(para.resultLength); }
extern static void getSend(ref SendPara para, byte[] bytes);