Data Structures | |
struct | DBusServerSocket |
Implementation details of DBusServerSocket. More... | |
Typedefs | |
typedef struct DBusServerSocket | DBusServerSocket |
Opaque object representing a Socket server implementation. | |
Functions | |
DBusServer * | _dbus_server_new_for_socket (int fd, const DBusString *address) |
Creates a new server listening on the given file descriptor. | |
DBusServer * | _dbus_server_new_for_tcp_socket (const char *host, dbus_uint32_t port, dbus_bool_t inaddr_any, DBusError *error) |
Creates a new server listening on TCP. | |
DBusServerListenResult | _dbus_server_listen_socket (DBusAddressEntry *entry, DBusServer **server_p, DBusError *error) |
Tries to interpret the address entry for various socket-related addresses (well, currently only tcp). | |
void | _dbus_server_socket_own_filename (DBusServer *server, char *filename) |
This is a bad hack since it's really unix domain socket specific. |
DBusServerListenResult _dbus_server_listen_socket | ( | DBusAddressEntry * | entry, | |
DBusServer ** | server_p, | |||
DBusError * | error | |||
) |
Tries to interpret the address entry for various socket-related addresses (well, currently only tcp).
Sets error if the result is not OK.
entry | an address entry | |
server_p | a new DBusServer, or NULL on failure. | |
error | location to store rationale for failure on bad address |
Definition at line 384 of file dbus-server-socket.c.
DBusServer* _dbus_server_new_for_socket | ( | int | fd, | |
const DBusString * | address | |||
) |
Creates a new server listening on the given file descriptor.
The file descriptor should be nonblocking (use _dbus_set_fd_nonblocking() to make it so). The file descriptor should be listening for connections, that is, listen() should have been successfully invoked on it. The server will use accept() to accept new client connections.
fd | the file descriptor. | |
address | the server's address |
Definition at line 245 of file dbus-server-socket.c.
Referenced by _dbus_server_new_for_domain_socket(), and _dbus_server_new_for_tcp_socket().
DBusServer* _dbus_server_new_for_tcp_socket | ( | const char * | host, | |
dbus_uint32_t | port, | |||
dbus_bool_t | inaddr_any, | |||
DBusError * | error | |||
) |
Creates a new server listening on TCP.
If inaddr_any is TRUE, listens on all local interfaces. Otherwise, it resolves the hostname and listens only on the resolved address of the hostname. The hostname is used even if inaddr_any is TRUE, as the hostname to report when dbus_server_get_address() is called. If the hostname is NULL, localhost is used.
host | the hostname to listen on. | |
port | the port to listen on or 0 to let the OS choose | |
inaddr_any | TRUE to listen on all local interfaces | |
error | location to store reason for failure. |
Definition at line 313 of file dbus-server-socket.c.
Referenced by _dbus_server_listen_socket().
void _dbus_server_socket_own_filename | ( | DBusServer * | server, | |
char * | filename | |||
) |
This is a bad hack since it's really unix domain socket specific.
Also, the function weirdly adopts ownership of the passed-in string.
server | a socket server | |
filename | socket filename to report/delete |
Definition at line 476 of file dbus-server-socket.c.
Referenced by _dbus_server_new_for_domain_socket().