From 87795b46f2bc732bd11067805709161bdc00d6b6 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 25 Feb 2018 17:56:55 -0800 Subject: More man page reorganization. Man pages need special handling, and we can have other kinds of documentation like initial starting guides, etc., which would have different processing applied. So lets move them off into their own directory. --- docs/man/nng_http_hijack.adoc | 63 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 docs/man/nng_http_hijack.adoc (limited to 'docs/man/nng_http_hijack.adoc') diff --git a/docs/man/nng_http_hijack.adoc b/docs/man/nng_http_hijack.adoc new file mode 100644 index 00000000..8a08751f --- /dev/null +++ b/docs/man/nng_http_hijack.adoc @@ -0,0 +1,63 @@ += nng_http_hijack(3) +// +// Copyright 2018 Staysail Systems, Inc. +// Copyright 2018 Capitar IT Group BV +// +// This document is supplied under the terms of the MIT License, a +// copy of which should be located in the distribution where this +// file was obtained (LICENSE.txt). A copy of the license may also be +// found online at https://opensource.org/licenses/MIT. +// + +== NAME + +nng_http_hijack - hijack HTTP server connection + +== SYNOPSIS + +[source, c] +----------- +#include +#include + +void nng_http_hijack(nng_http_conn *conn); +----------- + +== DESCRIPTION + +The `nng_http_hijack()` function hijacks the connection _conn_, causing it +to be disassociated from the HTTP server where it was created. + +The purpose of this function is the creation of HTTP upgraders (such as +WebSocket), where the underlying HTTP connection will be taken over for +some other purpose, and should not be used any further by the server. + +This function is most useful when called from a handler function. +(See <>.) + +TIP: This function is intended to facilitate uses cases that involve changing +the protocol from HTTP -- such as WebSocket. Most applications will never need +to use this function. + +== RETURN VALUES + +None. + +== ERRORS + +`NNG_ECLOSED`:: The connection was closed. +`NNG_ENOMEM`:: Insufficient free memory exists. +`NNG_ENOTSUP`:: HTTP not supported. + +== SEE ALSO + +<>, +<>, +<>, +<> -- cgit v1.2.3-70-g09d2