forked from enlightenment/efl
94 lines
3.3 KiB
Plaintext
94 lines
3.3 KiB
Plaintext
class Efl.Network.Server (Efl.Network) {
|
|
[[Efl network server]]
|
|
legacy_prefix: ecore_con_server;
|
|
eo_prefix: efl_network_server;
|
|
methods {
|
|
@property name {
|
|
[[Retrieves the name of server.
|
|
|
|
The name returned is the name used to connect on this server.
|
|
]]
|
|
set {
|
|
legacy: null;
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
name: string; [[The name of the server.]]
|
|
}
|
|
}
|
|
@property client_limit {
|
|
[[Sets a limit on the number of clients that can be handled concurrently
|
|
by the given server, and a policy on what to do if excess clients
|
|
try to connect.
|
|
|
|
Beware that if you set this once ecore is already running, you may
|
|
already have pending CLIENT_ADD events in your event queue. Those
|
|
clients have already connected and will not be affected by this call.
|
|
Only clients subsequently trying to connect will be affected.
|
|
]]
|
|
set {
|
|
}
|
|
get {
|
|
legacy: null;
|
|
}
|
|
values {
|
|
client_limit: int; [[The maximum number of clients to handle
|
|
concurrently. -1 means unlimited (default).
|
|
0 effectively disables the server.]]
|
|
reject_excess_clients: char; [[Set to 1 to automatically disconnect excess clients as
|
|
soon as they connect if you are already handling
|
|
client_limit clients. Set to 0 (default) to just
|
|
hold off on the "accept()" system call until the
|
|
number of active clients drops. This causes the
|
|
kernel to queue up to 4096 connections (or your
|
|
kernel's limit, whichever is lower).
|
|
]]
|
|
}
|
|
}
|
|
/* FIXME: Should this return an iterator? */
|
|
@property clients {
|
|
[[Retrieves the current list of clients.
|
|
|
|
Each node in the returned list points to an \@ref Efl_Network_Client.
|
|
This list cannot be modified or freed. It can also change if new
|
|
clients are connected or disconnected, and will become invalid
|
|
when the server is deleted/freed.
|
|
]]
|
|
get {
|
|
}
|
|
values {
|
|
// FIXME: Efl.Network.Client is needed, but that introduces a cycle
|
|
clients: const(list<const(Efl.Network)>); [[The list of clients on this server.]]
|
|
}
|
|
}
|
|
@property connection_type {
|
|
[[Type of the server connection as defined in @Ecore.Con.Type]]
|
|
get {
|
|
legacy: null;
|
|
}
|
|
set {
|
|
legacy: null;
|
|
}
|
|
values {
|
|
conn_type: Ecore.Con.Type; [[Connection type]]
|
|
}
|
|
}
|
|
}
|
|
implements {
|
|
Efl.Object.constructor;
|
|
Efl.Object.destructor;
|
|
Efl.Object.finalize;
|
|
Efl.Network.ip.get;
|
|
Efl.Network.uptime.get;
|
|
Efl.Network.port.set;
|
|
Efl.Network.port.get;
|
|
Efl.Network.fd.get;
|
|
Efl.Network.connected.get;
|
|
Efl.Network.timeout.set;
|
|
Efl.Network.timeout.get;
|
|
Efl.Network.flush;
|
|
Efl.Network.send;
|
|
}
|
|
}
|