summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con/efl_net_server_unix.eo
blob: 2a541b4eb17c68a372879f4e69e38cf981bab266 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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).

      @since 1.19
    ]]

    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;
    }
}