manpagez: man pages & more
html files: libsoup-2.4
Home | html | info | man

SoupServer deprecated API

SoupServer deprecated API

Includes

#include <libsoup/soup.h>

Description

Functions

soup_server_get_port ()

guint
soup_server_get_port (SoupServer *server);

soup_server_get_port is deprecated and should not be used in newly-written code.

If you are using soup_server_listen(), etc, then use soup_server_get_uris() to get a list of all listening addresses.

Gets the TCP port that server is listening on, if you are using the old API.

Parameters

server

a SoupServer

 

Returns

the port server is listening on.


soup_server_get_listener ()

SoupSocket *
soup_server_get_listener (SoupServer *server);

soup_server_get_listener is deprecated and should not be used in newly-written code.

If you are using soup_server_listen(), etc, then use soup_server_get_listeners() to get a list of all listening sockets, but note that that function returns GSockets, not SoupSockets.

Gets server 's listening socket, if you are using the old API.

You should treat this socket as read-only; writing to it or modifiying it may cause server to malfunction.

Parameters

server

a SoupServer

 

Returns

the listening socket.

[transfer none]


soup_server_run ()

void
soup_server_run (SoupServer *server);

soup_server_run is deprecated and should not be used in newly-written code.

When using soup_server_listen(), etc, the server will always listen for connections, and will process them whenever the thread-default GMainContext is running.

Starts server , if you are using the old API, causing it to listen for and process incoming connections. Unlike soup_server_run_async(), this creates a GMainLoop and runs it, and it will not return until someone calls soup_server_quit() to stop the server.

Parameters

server

a SoupServer

 

soup_server_run_async ()

void
soup_server_run_async (SoupServer *server);

soup_server_run_async is deprecated and should not be used in newly-written code.

When using soup_server_listen(), etc, the server will always listen for connections, and will process them whenever the thread-default GMainContext is running.

Starts server , if you are using the old API, causing it to listen for and process incoming connections.

The server runs in server 's GMainContext. It will not actually perform any processing unless the appropriate main loop is running. In the simple case where you did not set the server's SOUP_SERVER_ASYNC_CONTEXT property, this means the server will run whenever the glib main loop is running.

Parameters

server

a SoupServer

 

soup_server_quit ()

void
soup_server_quit (SoupServer *server);

soup_server_quit is deprecated and should not be used in newly-written code.

When using soup_server_listen(), etc, the server will always listen for connections, and will process them whenever the thread-default GMainContext is running.

Stops processing for server , if you are using the old API. Call this to clean up after soup_server_run_async(), or to terminate a call to soup_server_run().

Note that messages currently in progress will continue to be handled, if the main loop associated with the server is resumed or kept running.

server is still in a working state after this call; you can start and stop a server as many times as you want.

Parameters

server

a SoupServer

 

soup_server_get_async_context ()

GMainContext *
soup_server_get_async_context (SoupServer *server);

soup_server_get_async_context is deprecated and should not be used in newly-written code.

If you are using soup_server_listen(), etc, then the server listens on the thread-default GMainContext, and this property is ignored.

Gets server 's async_context, if you are using the old API. (With the new API, the server runs in the thread's thread-default GMainContext, regardless of what this method returns.)

This does not add a ref to the context, so you will need to ref it yourself if you want it to outlive its server.

Parameters

server

a SoupServer

 

Returns

server 's GMainContext, which may be NULL.

[nullable][transfer none]


soup_client_context_get_socket ()

SoupSocket *
soup_client_context_get_socket (SoupClientContext *client);

soup_client_context_get_socket is deprecated and should not be used in newly-written code.

use soup_client_context_get_gsocket(), which returns a GSocket.

Retrieves the SoupSocket that client is associated with.

If you are using this method to observe when multiple requests are made on the same persistent HTTP connection (eg, as the ntlm-test test program does), you will need to pay attention to socket destruction as well (either by using weak references, or by connecting to the “disconnected” signal), so that you do not get fooled when the allocator reuses the memory address of a previously-destroyed socket to represent a new socket.

Parameters

client

a SoupClientContext

 

Returns

the SoupSocket that client is associated with.

[transfer none]


soup_client_context_get_address ()

SoupAddress *
soup_client_context_get_address (SoupClientContext *client);

soup_client_context_get_address is deprecated and should not be used in newly-written code.

Use soup_client_context_get_remote_address(), which returns a GSocketAddress.

Retrieves the SoupAddress associated with the remote end of a connection.

Parameters

client

a SoupClientContext

 

Returns

the SoupAddress associated with the remote end of a connection, it may be NULL if you used soup_server_accept_iostream().

[nullable][transfer none]

Types and Values

SOUP_SERVER_PORT

#define SOUP_SERVER_PORT          "port"

SOUP_SERVER_PORT is deprecated and should not be used in newly-written code.

SoupServers can listen on multiple interfaces at once now. Use soup_server_listen(), etc, to listen on a port, and soup_server_get_uris() to see what ports are being listened on.

Alias for the deprecated “port” property, qv.


SOUP_SERVER_INTERFACE

#define SOUP_SERVER_INTERFACE     "interface"

SOUP_SERVER_INTERFACE is deprecated and should not be used in newly-written code.

SoupServers can listen on multiple interfaces at once now. Use soup_server_listen(), etc, to listen on an interface, and soup_server_get_uris() to see what addresses are being listened on.

Alias for the “interface” property, qv.


SOUP_SERVER_SSL_CERT_FILE

#define SOUP_SERVER_SSL_CERT_FILE "ssl-cert-file"

SOUP_SERVER_SSL_CERT_FILE is deprecated and should not be used in newly-written code.

use “tls-certificate” or soup_server_set_ssl_certificate().

Alias for the “ssl-cert-file” property, qv.


SOUP_SERVER_SSL_KEY_FILE

#define SOUP_SERVER_SSL_KEY_FILE  "ssl-key-file"

SOUP_SERVER_SSL_KEY_FILE is deprecated and should not be used in newly-written code.

use “tls-certificate” or soup_server_set_ssl_certificate().

Alias for the “ssl-key-file” property, qv.


SOUP_SERVER_ASYNC_CONTEXT

#define SOUP_SERVER_ASYNC_CONTEXT "async-context"

SOUP_SERVER_ASYNC_CONTEXT is deprecated and should not be used in newly-written code.

The new API uses the thread-default GMainContext rather than having an explicitly-specified one.

Alias for the deprecated “async-context” property, qv.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.