OpenSSL.Core.Native.BIO_read C# (CSharp) Method

BIO_read() private method

private BIO_read ( IntPtr b, byte buf, int len ) : int
b System.IntPtr
buf byte
len int
return int
        public static extern int BIO_read(IntPtr b, byte[] buf, int len);

Usage Example

Example #1
0
        /// <summary>
        /// Calls BIO_read()
        /// </summary>
        /// <param name="count"></param>
        /// <returns></returns>
        public ArraySegment <byte> ReadBytes(int count)
        {
            var buf = new byte[count];
            var ret = Native.BIO_read(ptr, buf, buf.Length);

            if (ret < 0)
            {
                throw new OpenSslException();
            }

            return(new ArraySegment <byte>(buf, 0, ret));
        }
All Usage Examples Of OpenSSL.Core.Native::BIO_read
Native