Sockopen » History » Version 15
Per Amundsen, 01/01/2022 12:53 AM
1 | 1 | Per Amundsen | _Added in 1.8.10_ |
---|---|---|---|
2 | |||
3 | 15 | Per Amundsen | */sockopen [-dentI46Cuswap] [bindip] <name> <address/hostname> <port> [certificate]* |
4 | 1 | Per Amundsen | |
5 | 7 | Per Amundsen | Opens a socket connection to the specified ipaddress/hostname and port. |
6 | |||
7 | 1 | Per Amundsen | *Switches* |
8 | |||
9 | -d - The specified IP address is the bind ip address. |
||
10 | -e - Creates an SSL connection. |
||
11 | 3 | Per Amundsen | -n - Disables the "Nagle algorithm":https://en.wikipedia.org/wiki/Nagle%27s_algorithm. |
12 | 1 | Per Amundsen | -t - *TODO* |
13 | 15 | Per Amundsen | -I - Accept invalid remote SSL/TLS certificates. *(AdiIRC only, deprecated)* |
14 | 2 | Per Amundsen | -4 - Connect to Ipv4 addresses. |
15 | 1 | Per Amundsen | -6 - Connect to Ipv6 addresses. |
16 | 15 | Per Amundsen | -C - Indicates that client [certificate] is specified. *(AdiIRC only)* |
17 | 1 | Per Amundsen | -u - Enables "dual stack sockets":https://docs.microsoft.com/en-us/windows/win32/winsock/dual-stack-sockets. |
18 | 15 | Per Amundsen | -s = Skip invalid remote SSL/TLS certificates certificates. |
19 | -w = Display warning dialog for invalid remote SSL/TLS certificates. |
||
20 | -a = Accept invalid remote SSL/TLS certificates. |
||
21 | -p = Prevent remote SSL/TLS certificate caching. |
||
22 | 1 | Per Amundsen | |
23 | *Parameters* |
||
24 | |||
25 | [bindip] - Bind ip to be used. |
||
26 | <name> - Socket connection name. |
||
27 | 7 | Per Amundsen | <address/hostname> - Remote ip address or hostname to connect to. |
28 | 1 | Per Amundsen | <port> - Remote port to connect to. |
29 | 10 | Per Amundsen | [certificate] - the SSL certificate "pfx":https://en.wikipedia.org/wiki/PKCS_12 file to use with -C, if not specified, the global client certificate is used. *(AdiIRC only)* |
30 | 1 | Per Amundsen | |
31 | *Example* |
||
32 | |||
33 | <pre> |
||
34 | alias example { |
||
35 | 13 | Per Amundsen | ; Initiate a connection with "irc.libera.chat" on port 6669, Secured connection. |
36 | /sockopen -e IRC irc.libera.chat +6697 |
||
37 | 1 | Per Amundsen | } |
38 | |||
39 | on *:sockopen:IRC:{ |
||
40 | 6 | Per Amundsen | ; Send our USER and NICK irc commands. |
41 | 1 | Per Amundsen | /sockwrite -n IRC USER Tester $+ $rand(1,100) Test Test:mSL Testing $+ $crlf |
42 | /sockwrite -n IRC NICK Tester $+ $rand(1,100) $crlf |
||
43 | } |
||
44 | |||
45 | 6 | Per Amundsen | ; Show all receiving data in a window. |
46 | 1 | Per Amundsen | on *:sockread:IRC:{ |
47 | /window -de @IRC |
||
48 | /var %x |
||
49 | /sockread %x |
||
50 | /aline -p @IRC $iif(%x,$v1,-) |
||
51 | } |
||
52 | </pre> |