DBusServer implementations for SOCKET
[D-Bus secret internal implementation details]

Implementation details of DBusServer on SOCKET. More...

Data Structures

struct  DBusServerSocket
 Implementation details of DBusServerSocket. More...

Typedefs

typedef 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, DBusError *error)
 Creates a new server listening on the given hostname and port.
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.

Detailed Description

Implementation details of DBusServer on SOCKET.


Function Documentation

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.

Parameters:
entry an address entry
server_p a new DBusServer, or NULL on failure.
error location to store rationale for failure on bad address
Returns:
the outcome

Definition at line 376 of file dbus-server-socket.c.

References _dbus_server_new_for_tcp_socket(), _dbus_set_bad_address(), _dbus_string_free(), _dbus_string_init_const(), _dbus_string_parse_int(), dbus_address_entry_get_method(), dbus_address_entry_get_value(), FALSE, and NULL.

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.

Parameters:
fd the file descriptor.
address the server's address
Returns:
the new server, or NULL if no memory.

Definition at line 245 of file dbus-server-socket.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.

Parameters:
host the hostname to listen on.
port the port to listen on.
error location to store reason for failure.
Returns:
the new server, or NULL on failure.

Definition at line 307 of file dbus-server-socket.c.

References _dbus_address_append_escaped(), _dbus_close_socket(), _dbus_fd_set_close_on_exec(), _dbus_listen_tcp_socket(), _dbus_server_new_for_socket(), _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_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.

Parameters:
server a socket server
filename socket filename to report/delete

Definition at line 441 of file dbus-server-socket.c.

References socket_name.

Referenced by _dbus_server_new_for_domain_socket().


Generated on Fri Sep 21 18:12:15 2007 for D-Bus by  doxygen 1.5.1