Esempio n. 1
0
        /**
         * Parameters:
         * - EndPoint * ep: a pointer to an an
         *
         */
        public Int32 Recv(EndPoint *ep, byte[] buffer, Int32 len)
        {
            fixed(byte *tmpBuf = buffer)
            {
                UInt32 bufLen = Convert.ToUInt32(len);
                Int32  length = ServerLibrary.Server_recvBytes(server, ep, new IntPtr(tmpBuf), bufLen);

                return(length);
            }
        }
Esempio n. 2
0
        public Int32 Recv(byte[] buffer, Int32 len)
        {
            fixed(byte *tmpBuf = buffer)
            {
                fixed(EndPoint *p = &rcvEndPoint)
                {
                    UInt32 bufLen = Convert.ToUInt32(len);
                    Int32  length = ServerLibrary.Server_recvBytes(connection, p, new IntPtr(tmpBuf), bufLen);

                    return(length);
                }
            }
        }