Method
SoupServerlisten
Declaration [src]
gboolean
soup_server_listen (
SoupServer* server,
GSocketAddress* address,
SoupServerListenOptions options,
GError** error
)
Description [src]
Attempts to set up server to listen for connections on address.
If options includes SOUP_SERVER_LISTEN_HTTPS, and server has
been configured for TLS, then server will listen for https
connections on this port. Otherwise it will listen for plain http.
You may call this method (along with the other “listen” methods) any number of times on a server, if you want to listen on multiple ports, or set up both http and https service.
After calling this method, server will begin accepting and processing
connections as soon as the appropriate GMainContext is run.
Note that this API does not make use of dual IPv4/IPv6 sockets; if
address is an IPv6 address, it will only accept IPv6 connections.
You must configure IPv4 listening separately.
Parameters
address-
Type:
GSocketAddressThe address of the interface to listen on.
The data is owned by the caller of the function. options-
Type:
SoupServerListenOptionsListening options for this server.
error-
Type:
GError **The return location for a recoverable error.
The argument can be NULL.If the return location is not NULL, then you must initialize it to aNULLGError*.The argument will left initialized to NULLby the method if there are no errors.In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.