Data Structures | |
struct | DBusServerUnix |
Implementation details of DBusServerUnix. More... | |
Typedefs | |
typedef DBusServerUnix | DBusServerUnix |
Opaque object representing a Unix server implementation. | |
Functions | |
DBusServer * | _dbus_server_new_for_fd (int fd, const DBusString *address) |
Creates a new server listening on the given file descriptor. | |
DBusServer * | _dbus_server_new_for_domain_socket (const char *path, dbus_bool_t abstract, DBusError *error) |
Creates a new server listening on the given Unix domain socket. | |
DBusServer * | _dbus_server_new_for_tcp_socket (const char *host, dbus_uint32_t port, DBusError *error) |
Creates a new server listening on the given hostname and port. |
DBusServer* _dbus_server_new_for_domain_socket | ( | const char * | path, | |
dbus_bool_t | abstract, | |||
DBusError * | error | |||
) |
Creates a new server listening on the given Unix domain socket.
path | the path for the domain socket. | |
abstract | TRUE to use abstract socket namespace | |
error | location to store reason for failure. |
Definition at line 315 of file dbus-server-unix.c.
References _dbus_address_append_escaped(), _dbus_close(), _dbus_fd_set_close_on_exec(), _dbus_listen_unix_socket(), _dbus_server_new_for_fd(), _dbus_strdup(), _dbus_string_append(), _dbus_string_free(), _dbus_string_init(), _dbus_string_init_const(), DBUS_ERROR_NO_MEMORY, dbus_free(), dbus_set_error(), NULL, and socket_name.
Referenced by dbus_server_listen().
DBusServer* _dbus_server_new_for_fd | ( | 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 254 of file dbus-server-unix.c.
References _dbus_server_add_watch(), _dbus_server_finalize_base(), _dbus_server_init_base(), _dbus_watch_new(), _dbus_watch_unref(), base, dbus_free(), dbus_new0, fd, NULL, TRUE, and watch.
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, | |||
DBusError * | error | |||
) |
Creates a new server listening on the given hostname and port.
If the hostname is NULL, listens on localhost.
host | the hostname to listen on. | |
port | the port to listen on. | |
error | location to store reason for failure. |
Definition at line 395 of file dbus-server-unix.c.
References _dbus_address_append_escaped(), _dbus_close(), _dbus_fd_set_close_on_exec(), _dbus_listen_tcp_socket(), _dbus_server_new_for_fd(), _dbus_string_append(), _dbus_string_append_int(), _dbus_string_free(), _dbus_string_init(), _dbus_string_init_const(), DBUS_ERROR_NO_MEMORY, dbus_set_error(), and NULL.
Referenced by dbus_server_listen().