summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con/efl_net_dialer_ssl.eo
blob: c732e1c6214cec4e9124895bce384b3e89ae258b (plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
class Efl.Net.Dialer_Ssl (Efl.Net.Socket_Ssl, Efl.Net.Dialer) {
    [[Connects to a remote SSL server using TCP.

      This creates an internal @Efl.Net.Dialer_Tcp and once connected
      it will start the SSL handshake.

      If the proxy is NULL (default), then the system proxy will be
      used. On UNIX that's the environment variable $socks_proxy (or
      '$proxy' or '$all_proxy') is used if the given address doesn't
      match $no_proxy patterns. To disable proxy use an empty string.

      If the proxy is NULL (default), then the system proxy will be
      used. On UNIX that's the environment variable $socks_proxy (or
      '$all_proxy') is used if the given address doesn't match
      $no_proxy patterns. To disable proxy use an empty string. If
      provided proxy must be one of the protocols:

       - socks5://username:password\@proxyserver:port (SOCKSv5)
       - socks5h://username\@proxyserver:port (let socks server to resolve domain)
       - socks5://proxyserver:port
       - socks5://proxyserver (default port 1080)
       - socks4a://proxyserver:port (SOCKSv4 and let socks server to resolve domain)
       - socks4://proxyserver:port (SOCKSv4)

      @since 1.19
    ]]

    methods {
        @property ssl_context {
            [[Defines the SSL context to use for this dialer.

              This specifies a shared context for all clients, with
              certificate, private keys, CRL, CAs...

              It must be called before @Efl.Object.finalize!
            ]]
            values {
                ssl_context: Efl.Net.Ssl.Context; [[SSL context]]
            }
        }

        @property keep_alive {
            [[Controls keep-alive using SO_KEEPALIVE]]
            get { }
            set {
                return: bool (false); [[$true on success]]
            }
            values {
                keep_alive: bool; [[$true if keep alive is enabled, $false otherwise]]
            }
        }

        @property no_delay {
            [[Controls TCP's no-delay using TCP_NODELAY]]
            get { }
            set {
                return: bool (false); [[$true on success]]
            }
            values {
                no_delay: bool; [[$true if no delay is enabled, $false otherwise]]
            }
        }

        /* Note: no cork as it doesn't make sense here for the wrapped connection */
    }

    implements {
        Efl.Object.constructor;
        Efl.Object.finalize;
        Efl.Object.invalidate;
        Efl.Net.Dialer.dial;
        Efl.Net.Dialer.address_dial { get; }
        Efl.Net.Dialer.connected { get; set; }
        Efl.Net.Dialer.proxy { get; set; }
        Efl.Net.Dialer.timeout_dial { get; set; }
        Efl.Io.Closer.close;
    }
}