forked from enlightenment/efl
46 lines
1.6 KiB
Plaintext
46 lines
1.6 KiB
Plaintext
class @beta Efl.Net.Server_Unix extends Efl.Net.Server_Fd {
|
|
[[An AF_UNIX server.
|
|
|
|
The @Efl.Net.Server.serve method will call bind(2) directly.
|
|
This means the path will be accessed and created in that method. If the
|
|
created socket must be subject to some special mode or user,
|
|
change before executing said method, for example by calling
|
|
umask(2).
|
|
]]
|
|
|
|
methods {
|
|
@property unlink_before_bind {
|
|
[[AF_UNIX paths may be stale due to crashes. Remove files and try again.
|
|
|
|
If this property is $true, then it will unlink() before
|
|
bind() is done, repeating this process if EADDRINUSE.
|
|
|
|
By default it's false and you will get EADDRINUSE.
|
|
]]
|
|
values {
|
|
unlink_before_bind: bool; [[If $true, server will unlink() the path before bind() is called.]]
|
|
}
|
|
}
|
|
|
|
@property leading_directories_create {
|
|
[[If $true, all parent directories will be created with the given mode.
|
|
|
|
This is only effective before @Efl.Net.Server.serve is
|
|
called as it is used from inside that method.
|
|
]]
|
|
values {
|
|
leading_directories_create: bool; [[If $true, create missing parent directories. Do nothing if $false]]
|
|
mode: uint; [[The file system permissions to use (file mode)]]
|
|
}
|
|
}
|
|
}
|
|
|
|
implements {
|
|
Efl.Object.destructor;
|
|
Efl.Net.Server.serve;
|
|
Efl.Net.Server_Fd.client_add;
|
|
Efl.Net.Server_Fd.client_reject;
|
|
Efl.Net.Server_Fd.socket_activate;
|
|
}
|
|
}
|