A GSocketListener is an object that keeps track of a set of server sockets and helps you accept sockets from any of the socket, either sync or async.
Add addresses and ports to listen on using g_socket_listener_add_address() and g_socket_listener_add_inet_port(). These will be listened on until g_socket_listener_close() is called. Dropping your final reference to the GSocketListener will not cause g_socket_listener_close() to be called implicitly, as some references to the GSocketListener may be held internally.
Sets our main struct and passes it to the parent class.
Creates a new GSocketListener with no sockets to listen for. New listeners can be added with e.g. g_socket_listener_add_address() or g_socket_listener_add_inet_port().
Blocks waiting for a client to connect to any of the sockets added to the listener. Returns a GSocketConnection for the socket that was accepted.
This is the asynchronous version of g_socket_listener_accept().
Finishes an async accept operation. See g_socket_listener_accept_async()
Blocks waiting for a client to connect to any of the sockets added to the listener. Returns the GSocket that was accepted.
This is the asynchronous version of g_socket_listener_accept_socket().
Finishes an async accept operation. See g_socket_listener_accept_socket_async()
Creates a socket of type type and protocol protocol, binds it to address and adds it to the set of sockets we're accepting sockets from.
Listens for TCP connections on any available port number for both IPv6 and IPv4 (if each is available).
Helper function for g_socket_listener_add_address() that creates a TCP/IP socket listening on IPv4 and IPv6 (if supported) on the specified port on all interfaces.
Emitted when listener's activity on socket changes state. Note that when listener is used to listen on both IPv4 and IPv6, a separate set of signals will be emitted for each, and the order they happen in is undefined.
Adds socket to the set of sockets that we try to accept new clients from. The socket must be bound to a local address and listened to.
Closes all the sockets in the listener.
Get the main Gtk struct
the main Gtk struct as a void*
Sets the listen backlog on the sockets in the listener.
the main Gtk struct