Exemple #1
0
            /// <summary>
            /// Send the last chunk of data and indicate the HTTP response is ended
            /// </summary>
            /// <param name="buffer">The last chunk of data</param>
            /// <returns>The data size in byte</returns>
            /// <remarks>You must call the method StartChunkResponse before calling this method</remarks>
            public uint EndChunkResponse(byte[] buffer)
            {
                uint len;

                if (buffer == null)
                {
                    len = 0;
                }
                else
                {
                    len = (uint)buffer.Length;
                }
                Clear();
                unsafe
                {
                    fixed(byte *p = buffer)
                    {
                        return(ServerCoreLoader.EndHTTPChunkResponse(Handle, p, len));
                    }
                }
            }