D-Bus
1.4.10
|
Implementation details of DBusTransport on sockets. More...
Data Structures | |
struct | DBusTransportSocket |
Implementation details of DBusTransportSocket. More... | |
Typedefs | |
typedef struct DBusTransportSocket | DBusTransportSocket |
Opaque object representing a socket file descriptor transport. | |
Functions | |
DBusTransport * | _dbus_transport_new_for_socket (int fd, const DBusString *server_guid, const DBusString *address) |
Creates a new transport for the given socket file descriptor. | |
DBusTransport * | _dbus_transport_new_for_tcp_socket (const char *host, const char *port, const char *family, const char *noncefile, DBusError *error) |
Creates a new transport for the given hostname and port. | |
DBusTransportOpenResult | _dbus_transport_open_socket (DBusAddressEntry *entry, DBusTransport **transport_p, DBusError *error) |
Opens a TCP socket transport. |
Implementation details of DBusTransport on sockets.
DBusTransport* _dbus_transport_new_for_socket | ( | int | fd, |
const DBusString * | server_guid, | ||
const DBusString * | address | ||
) |
Creates a new transport for the given socket file descriptor.
The file descriptor must be nonblocking (use _dbus_set_fd_nonblocking() to make it so). This function is shared by various transports that boil down to a full duplex file descriptor.
fd | the file descriptor. |
server_guid | non-NULL if this transport is on the server side of a connection |
address | the transport's address |
Definition at line 1232 of file dbus-transport-socket.c.
References dbus_new0, NULL, _dbus_string_init(), encoded_outgoing, encoded_incoming, write_watch, _dbus_watch_new(), FALSE, read_watch, _dbus_transport_init_base(), base, _dbus_auth_set_unix_fd_possible(), DBusTransport::auth, _dbus_socket_can_pass_unix_fd(), fd, message_bytes_written, max_bytes_read_per_iteration, max_bytes_written_per_iteration, _dbus_watch_unref(), _dbus_string_free(), and dbus_free().
Referenced by _dbus_transport_new_for_tcp_socket(), and _dbus_transport_new_for_domain_socket().
DBusTransport* _dbus_transport_new_for_tcp_socket | ( | const char * | host, |
const char * | port, | ||
const char * | family, | ||
const char * | noncefile, | ||
DBusError * | error | ||
) |
Creates a new transport for the given hostname and port.
If host is NULL, it will default to localhost
host | the host to connect to |
port | the port to connect to |
family | the address family to connect to |
path | to nonce file |
error | location to store reason for failure. |
Definition at line 1305 of file dbus-transport-socket.c.
References _dbus_string_init(), dbus_set_error(), DBUS_ERROR_NO_MEMORY, NULL, _dbus_string_append(), _dbus_string_free(), _dbus_transport_new_for_socket(), and _dbus_close_socket().
Referenced by _dbus_transport_open_socket(), and _dbus_transport_open_platform_specific().
DBusTransportOpenResult _dbus_transport_open_socket | ( | DBusAddressEntry * | entry, |
DBusTransport ** | transport_p, | ||
DBusError * | error | ||
) |
Opens a TCP socket transport.
entry | the address entry to try opening as a tcp transport. |
transport_p | return location for the opened transport |
error | error to be set |
Definition at line 1384 of file dbus-transport-socket.c.
References dbus_address_entry_get_method(), _dbus_assert, NULL, dbus_address_entry_get_value(), TRUE, _dbus_set_bad_address(), and _dbus_transport_new_for_tcp_socket().