Sockopen » History » Revision 15
Revision 14 (Per Amundsen, 12/23/2021 05:49 AM) → Revision 15/16 (Per Amundsen, 01/01/2022 12:53 AM)
_Added in 1.8.10_ */sockopen [-dentI46Cuswap] [-dentI46Cu] [bindip] <name> <address/hostname> <port> [certificate]* Opens a socket connection to the specified ipaddress/hostname and port. *Switches* -d - The specified IP address is the bind ip address. -e - Creates an SSL connection. -n - Disables the "Nagle algorithm":https://en.wikipedia.org/wiki/Nagle%27s_algorithm. -t - *TODO* -I - Accept invalid remote SSL/TLS certificates. *(AdiIRC only, deprecated)* only)* -4 - Connect to Ipv4 addresses. -6 - Connect to Ipv6 addresses. -C - Indicates that client [certificate] is specified. *(AdiIRC only)* -u - Enables "dual stack sockets":https://docs.microsoft.com/en-us/windows/win32/winsock/dual-stack-sockets. -s = Skip invalid remote SSL/TLS certificates certificates. -w = Display warning dialog for invalid remote SSL/TLS certificates. -a = Accept invalid remote SSL/TLS certificates. -p = Prevent remote SSL/TLS certificate caching. *Parameters* [bindip] - Bind ip to be used. <name> - Socket connection name. <address/hostname> - Remote ip address or hostname to connect to. <port> - Remote port to connect to. [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)* *Example* <pre> alias example { ; Initiate a connection with "irc.libera.chat" on port 6669, Secured connection. /sockopen -e IRC irc.libera.chat +6697 } on *:sockopen:IRC:{ ; Send our USER and NICK irc commands. /sockwrite -n IRC USER Tester $+ $rand(1,100) Test Test:mSL Testing $+ $crlf /sockwrite -n IRC NICK Tester $+ $rand(1,100) $crlf } ; Show all receiving data in a window. on *:sockread:IRC:{ /window -de @IRC /var %x /sockread %x /aline -p @IRC $iif(%x,$v1,-) } </pre>