Get a formatted link corresponding to the current request
Return information associated with a HTTP/HTTPS response. Use this function in a client, to check the response from the server.
Returns the cookie value string that matches the cookie name
cookie name to get the value from
cookie value
header name to get the value from
header value
Returns a query which contained in the supplied buffer. The occurrence value is a zero-based index of a particular key name. This should not be confused with the index over all of the keys. Note that this function assumes that parameters are sent as text in http query string format, which is the default for web forms. This function will work for html forms with method="GET" and method="POST" attributes. In other cases, you may use a getParam version that directly takes the data instead of the connection as a first argument.
the key to search for
parameter value
Returns response body from a request made as POST. Since the connections map is protected, it can't be directly accessed. This uses string to store post data to handle big posts.
Post data
Read data from the remote end, return number of bytes read.
connection has been closed by peer. No more data could be read.
Send data to a websocket server wrapped in a masked websocket frame. Uses mg_lock_connection to ensure that the transmission is not interrupted, i.e., when the application is proactively communicating and responding to a request simultaneously.
Send data to a websocket erver wrapped in a websocket frame. This function is available when civetweb is compiled with -DUSE_WEBSOCKET
Call is blocking.
0 when the connection has been closed
Send data to a websocket client wrapped in a websocket frame. Uses mg_lock_connection to ensure that the transmission is not interrupted, i.e., when the application is proactively communicating and responding to a request simultaneously.
Send data to a websocket client wrapped in a websocket frame. This function is available when civetweb is compiled with -DUSE_WEBSOCKET
Call is blocking.
0 when the connection has been closed
Send data to the client.
Call is blocking
0 when the connection has been closed
Generated using TypeDoc
Return information associated with the request. Use this function to implement a server and get data about a request from a HTTP/HTTPS client. Note: Before CivetWeb 1.10, this function could be used to read a response from a server, when implementing a client, although the values were never returned in appropriate mg_request_info elements. It is strongly advised to use mg_get_response_info for clients.