Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 extern static void getSend(ref SendPara para, byte[] bytes);