ChromiumFX/Generated/CfxServer.cs
/// <summary>
/// Send a custom HTTP response to the connection identified by
/// |connectionId|. |responseCode| is the HTTP response code sent in the
/// status line (e.g. 200), |contentType| is the response content type sent as
/// the "Content-Type" header (e.g. "text/html"), |contentLength| is the
/// expected content length, and |extraHeaders| is the map of extra response
/// headers. If |contentLength| is >= 0 then the "Content-Length" header will
/// be sent. If |contentLength| is 0 then no content is expected and the
/// connection will be closed automatically after the response is sent. If
/// |contentLength| is &lt; 0 then no "Content-Length" header will be sent and
/// the client will continue reading until the connection is closed. Use the
/// SendRawData function to send the content, if applicable, and call
/// CloseConnection after all content has been sent.
/// </summary>
/// <remarks>
/// See also the original CEF documentation in
/// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_server_capi.h">cef/include/capi/cef_server_capi.h</see>.
/// </remarks>
Send a custom HTTP response to the connection identified by
|connectionId|.
Send a custom HTTP response to the connection identified by |connectionId| .
public void SendHttpResponse(int connectionId, int responseCode, string contentType, long contentLength, System.Collections.Generic.List<string[]> extraHeaders) {
            var contentType_pinned = new PinnedString(contentType);
            PinnedString[] extraHeaders_handles;
            var extraHeaders_unwrapped = StringFunctions.UnwrapCfxStringMultimap(extraHeaders, out extraHeaders_handles);
            CfxApi.Server.cfx_server_send_http_response(NativePtr, connectionId, responseCode, contentType_pinned.Obj.PinnedPtr, contentType_pinned.Length, contentLength, extraHeaders_unwrapped);
            contentType_pinned.Obj.Free();
            StringFunctions.FreePinnedStrings(extraHeaders_handles);
            StringFunctions.CfxStringMultimapCopyToManaged(extraHeaders_unwrapped, extraHeaders);
            CfxApi.Runtime.cfx_string_multimap_free(extraHeaders_unwrapped);
        }
public void SendHttpResponse ( int connectionId , int responseCode , string contentType , long contentLength , System . Collections . Generic . List < string [ ] > extraHeaders ) { var contentType_pinned = new PinnedString ( contentType ) ; PinnedString [ ] extraHeaders_handles ; var extraHeaders_unwrapped = StringFunctions . UnwrapCfxStringMultimap ( extraHeaders , out extraHeaders_handles ) ; CfxApi . Server . cfx_server_send_http_response ( NativePtr , connectionId , responseCode , contentType_pinned . Obj . PinnedPtr , contentType_pinned . Length , contentLength , extraHeaders_unwrapped ) ; contentType_pinned . Obj . Free ( ) ; StringFunctions . FreePinnedStrings ( extraHeaders_handles ) ; StringFunctions . CfxStringMultimapCopyToManaged ( extraHeaders_unwrapped , extraHeaders ) ; CfxApi . Runtime . cfx_string_multimap_free ( extraHeaders_unwrapped ) ; }
Send a custom HTTP response to the connection identified by
|connectionId|.
Send a custom HTTP response to the connection identified by |connectionId| .
connectionId
int
responseCode
int
contentType
string
contentLength
long
extraHeaders
System.Collections.Generic.List<string[]>
remarks
See also the original CEF documentation in
cef/include/capi/cef_server_capi.h
See also the original CEF documentation in cef / include / capi / cef_server_capi . h