| GSK Reference Manual | ||||
|---|---|---|---|---|
GskStreamListenerSocket;
GskStreamListener* gsk_stream_listener_socket_new_bind
(GskSocketAddress *address,
GError **error);
GskStreamListener* gsk_stream_listener_socket_new_bind_full
(GskSocketAddress *address,
GskStreamListenerSocketFlags flags,
GError **error);
void gsk_stream_listener_socket_set_backlog
(GskStreamListenerSocket *lis,
guint backlog);
GskStreamListener* gsk_stream_listener_socket_new_from_fd
(int fd,
GError **error);
#define GSK_STREAM_LISTENER_SOCKET_USE_GLIB_MAIN_LOOP
"file-descriptor" GskFd : Read / Write / Construct Only "listening-address" GskSocketAddress : Read / Write / Construct Only "may-reuse-address" gboolean : Read / Write / Construct Only "unlink-when-done" gboolean : Read / Write
typedef struct _GskStreamListenerSocket GskStreamListenerSocket;
An instance of a socket-based GskStreamListener.
GskStreamListener* gsk_stream_listener_socket_new_bind (GskSocketAddress *address, GError **error);
Create a new listener bound to a specific socket-address.
address : |
the address that the listener should be bound to. |
error : |
optional location to store error at. |
| Returns : | the newly created stream-listener. |
GskStreamListener* gsk_stream_listener_socket_new_bind_full (GskSocketAddress *address, GskStreamListenerSocketFlags flags, GError **error);
Create a new listener bound to a specific socket-address.
If flags suggests GSK_SOCKET_LISTENER_STREAM_DONT_REUSE_ADDRESS,
then the usual timeout rules about how often a port
may be bound are ignored. This only really affects
TCP/IP socket listeners.
address : |
the address that the listener should be bound to. |
flags : |
flags controlling the operation of the listener. |
error : |
optional location to store error at. |
| Returns : | the newly created stream-listener. |
void gsk_stream_listener_socket_set_backlog
(GskStreamListenerSocket *lis,
guint backlog);
Set the number of incoming connections that can be accepted before they are rejected outright.
lis : |
the listener whose backlog quota should be affected. |
backlog : |
the number of incoming connections to accept before refusing them. |
GskStreamListener* gsk_stream_listener_socket_new_from_fd (int fd, GError **error);
fd: The bound socket.
error: optional location to store error at.
returns: The newly created stream-listener.
Create a new listener for an already bound socket.
fd : |
|
error : |
|
| Returns : |
file-descriptor" property"file-descriptor" GskFd : Read / Write / Construct Only
whence to accept new connections on.
listening-address" property"listening-address" GskSocketAddress : Read / Write / Construct Only
The name others will use to connect.
may-reuse-address" property"may-reuse-address" gboolean : Read / Write / Construct Only
Whether a listening address may be reused as soon as it's closed.
Default value: TRUE