GObject.Object
Gio.SocketListener
Gio.SocketService
Import line: | Gio = imports.gi.Gio; |
GIR File: | Gio-2.0.gir |
C documentation: | GSocketService |
Class : | SocketService |
Extends: | Gio.SocketListener |
Properties | Defined By | |
---|---|---|
listen_backlog : gint32
|
Gio.SocketListener | |
parent_instance : Gio.SocketListener
read only
|
Gio.SocketService | |
priv : Gio.SocketServicePrivate
read only
|
Gio.SocketService |
Method / Constructor | Defined By | |
---|---|---|
new Gio.SocketService
(Object properties)
Create a new Gio.SocketService
Create a new Gio.SocketService
|
||
Blocks waiting for a client to connect to any of the sockets added
to the listener.
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. If source_object is not NULL it will be filled out with the source object specified when the corresponding socket or address was added to the listener. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.
|
Gio.SocketListener | |
This is the asynchronous version of g_socket_listener_accept().
This is the asynchronous version of g_socket_listener_accept().
When the operation is finished callback will be called. You can then call g_socket_listener_accept_socket() to get the result of the operation.
|
Gio.SocketListener | |
Finishes an async accept operation.
Finishes an async accept operation. See g_socket_listener_accept_async()
|
Gio.SocketListener | |
Blocks waiting for a client to connect to any of the sockets added
to the listener.
Blocks waiting for a client to connect to any of the sockets added
to the listener. Returns the GSocket that was accepted. If you want to accept the high-level GSocketConnection, not a GSocket, which is often the case, then you should use g_socket_listener_accept() instead. If source_object is not NULL it will be filled out with the source object specified when the corresponding socket or address was added to the listener. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.
|
Gio.SocketListener | |
This is the asynchronous version of g_socket_listener_accept_socket().
This is the asynchronous version of g_socket_listener_accept_socket().
When the operation is finished callback will be called. You can then call g_socket_listener_accept_socket_finish() to get the result of the operation.
|
Gio.SocketListener | |
Finishes an async accept operation.
Finishes an async accept operation. See g_socket_listener_accept_socket_async()
|
Gio.SocketListener | |
add_address
(SocketAddress address, SocketType type, SocketProtocol protocol, Object source_object, Object out_values)
:
gboolean
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.
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. Note that adding an IPv6 address, depending on the platform, may or may not result in a listener that also accepts IPv4 connections. For more determinstic behaviour, see g_socket_listener_add_inet_port(). to accept to identify this particular source, which is useful if you're listening on multiple addresses and do different things depending on what address is connected to. If successful and effective_address is non-NULL then it will be set to the address that the binding actually occured at. This is helpful for determining the port number that was used for when requested, belongs to the caller and must be freed.
|
Gio.SocketListener | |
Listens for TCP connections on any available port number for both
IPv6 and IPv4 (if each are available).
Listens for TCP connections on any available port number for both
IPv6 and IPv4 (if each are available). This is useful if you need to have a socket for incoming connections but don't care about the specific port number. to accept to identify this particular source, which is useful if you're listening on multiple addresses and do different things depending on what address is connected to.
|
Gio.SocketListener | |
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.
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. to accept to identify this particular source, which is useful if you're listening on multiple addresses and do different things depending on what address is connected to.
|
Gio.SocketListener | |
Adds socket to the set of sockets that we try to accept
new clients from.
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. to accept to identify this particular source, which is useful if you're listening on multiple addresses and do different things depending on what address is connected to.
|
Gio.SocketListener | |
close
()
:
none
Closes all the sockets in the listener.
Closes all the sockets in the listener.
|
Gio.SocketListener | |
is_active
()
:
gboolean
Check whether the service is active or not.
Check whether the service is active or not. An active
service will accept new clients that connect, while a non-active service will let connecting clients queue up until the service is started.
|
Gio.SocketService | |
set_backlog
(gint32 listen_backlog)
:
none
Sets the listen backlog on the sockets in the listener.
Sets the listen backlog on the sockets in the listener.
See g_socket_set_listen_backlog() for details
|
Gio.SocketListener | |
start
()
:
none
Starts the service, i.e.
Starts the service, i.e. start accepting connections
from the added sockets when the mainloop runs. This call is threadsafe, so it may be called from a thread handling an incomming client request.
|
Gio.SocketService | |
stop
()
:
none
Stops the service, i.e.
Stops the service, i.e. stops accepting connections
from the added sockets when the mainloop runs. This call is threadsafe, so it may be called from a thread handling an incomming client request.
|
Gio.SocketService |
Event | Defined By | |
---|---|---|
The ::incoming signal is emitted when a new incoming connection
to service needs to be handled.
The ::incoming signal is emitted when a new incoming connection
to service needs to be handled. The handler must initiate the handling of connection, but may not block; in essence, asynchronous operations must be used.
|
Gio.SocketService |