SoupServer 3 LIBSOUP Library
SoupServer

## Synopsis

    struct      SoupServerContext;
    void        (*SoupServerCallbackFn)         (SoupServerContext *context,
                                                 SoupMessage *msg,
                                                 gpointer user_data);
    void        (*SoupServerUnregisterFn)       (SoupServer *server,
                                                 SoupServerHandler *handler,
                                                 gpointer user_data);
    #define     SOUP_SERVER_PORT
    #define     SOUP_SERVER_INTERFACE
    #define     SOUP_SERVER_SSL_CERT_FILE
    #define     SOUP_SERVER_SSL_KEY_FILE
    SoupServer* soup_server_new                 (const char *optname1,
                                                 ...);
    SoupProtocol soup_server_get_protocol       (SoupServer *serv);
    guint       soup_server_get_port            (SoupServer *serv);
    void        soup_server_run                 (SoupServer *serv);
    void        soup_server_run_async           (SoupServer *serv);
    void        soup_server_quit                (SoupServer *serv);
    void        soup_server_add_handler         (SoupServer *serv,
                                                 const char *path,
                                                 SoupServerAuthContext *auth_ctx,
                                                 SoupServerCallbackFn callback,
                                                 SoupServerUnregisterFn unreg,
                                                 gpointer data);
    void        soup_server_remove_handler      (SoupServer *serv,
                                                 const char *path);
    SoupServerHandler* soup_server_get_handler  (SoupServer *serv,
                                                 const char *path);
    GSList*     soup_server_list_handlers       (SoupServer *serv);
    SoupAddress* soup_server_context_get_client_address
                                                (SoupServerContext *ctx);
    const char* soup_server_context_get_client_host
                                                (SoupServerContext *ctx);

## Description

## Details

### struct SoupServerContext

    struct SoupServerContext {

    	SoupMessage       *msg;
    	char              *path;
    	SoupMethodId       method_id;
    	SoupServerAuth    *auth;
    	SoupServer        *server;
    	SoupServerHandler *handler;
    	SoupSocket        *sock;
    };

SoupServerContext

### SoupServerCallbackFn ()

    void        (*SoupServerCallbackFn)         (SoupServerContext *context,
                                                 SoupMessage *msg,
                                                 gpointer user_data);

context :

msg :

user_data :

SoupServerCallbackFn

### SoupServerUnregisterFn ()

    void        (*SoupServerUnregisterFn)       (SoupServer *server,
                                                 SoupServerHandler *handler,
                                                 gpointer user_data);

server :

handler :

user_data :

SoupServerUnregisterFn

### SOUP_SERVER_PORT

    #define SOUP_SERVER_PORT          "port"

SOUP_SERVER_PORT

### SOUP_SERVER_INTERFACE

    #define SOUP_SERVER_INTERFACE     "interface"

SOUP_SERVER_INTERFACE

### SOUP_SERVER_SSL_CERT_FILE

    #define SOUP_SERVER_SSL_CERT_FILE "ssl-cert-file"

SOUP_SERVER_SSL_CERT_FILE

### SOUP_SERVER_SSL_KEY_FILE

    #define SOUP_SERVER_SSL_KEY_FILE  "ssl-key-file"

SOUP_SERVER_SSL_KEY_FILE

### soup_server_new ()

    SoupServer* soup_server_new                 (const char *optname1,
                                                 ...);

optname1 :

... :

Returns :

soup_server_new

### soup_server_get_protocol ()

    SoupProtocol soup_server_get_protocol       (SoupServer *serv);

serv :

Returns :

soup_server_get_protocol

### soup_server_get_port ()

    guint       soup_server_get_port            (SoupServer *serv);

serv :

Returns :

soup_server_get_port

### soup_server_run ()

    void        soup_server_run                 (SoupServer *serv);

serv :

soup_server_run

### soup_server_run_async ()

    void        soup_server_run_async           (SoupServer *serv);

serv :

soup_server_run_async

### soup_server_quit ()

    void        soup_server_quit                (SoupServer *serv);

serv :

soup_server_quit

### soup_server_add_handler ()

    void        soup_server_add_handler         (SoupServer *serv,
                                                 const char *path,
                                                 SoupServerAuthContext *auth_ctx,
                                                 SoupServerCallbackFn callback,
                                                 SoupServerUnregisterFn unreg,
                                                 gpointer data);

serv :

path :

auth_ctx :

callback :

unreg :

data :

soup_server_add_handler

### soup_server_remove_handler ()

    void        soup_server_remove_handler      (SoupServer *serv,
                                                 const char *path);

serv :

path :

soup_server_remove_handler

### soup_server_get_handler ()

    SoupServerHandler* soup_server_get_handler  (SoupServer *serv,
                                                 const char *path);

serv :

path :

Returns :

soup_server_get_handler

### soup_server_list_handlers ()

    GSList*     soup_server_list_handlers       (SoupServer *serv);

serv :

Returns :

soup_server_list_handlers

### soup_server_context_get_client_address ()

    SoupAddress* soup_server_context_get_client_address
                                                (SoupServerContext *ctx);

ctx :

Returns :

soup_server_context_get_client_address

### soup_server_context_get_client_host ()

    const char* soup_server_context_get_client_host
                                                (SoupServerContext *ctx);

ctx :

Returns :

soup_server_context_get_client_host