From WikiChip
Difference between revisions of "mirc/identifiers/$sock"
(Created page with "{{mirc title|$sock identifier}}'''$sock''' returns informations about currently opened sockets. == Synopsis == <pre>$sock(name,N)</pre> == Parameters == * '''name''' - The...") |
(→Properties) |
||
Line 28: | Line 28: | ||
* '''.pause''' - returns $true if a socket has been paused | * '''.pause''' - returns $true if a socket has been paused | ||
* '''.starttls''' - returns $true for a STARTTLS connection | * '''.starttls''' - returns $true for a STARTTLS connection | ||
− | * '''bindip''' - returns the ip address or adapter name used when binding IP | + | * '''.bindip''' - returns the ip address or adapter name used when binding IP |
* '''.bindport''' - returns the port name used when binding IP | * '''.bindport''' - returns the port name used when binding IP | ||
Revision as of 18:30, 17 March 2018
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$sock returns informations about currently opened sockets.
Synopsis
$sock(name,N)
Parameters
- name - The name of the socket, you can use a wildcard expression and use the N parameter to get the Nth socket
- N - The Nth matching socket, to be used with a wildcard expression, default to 1
Properties
- .name - returns the name you give to a connection to identify it
- .addr - returns the original named address if one was used.
- .sent - returns the number of bytes sent over that connection so far
- .rcvd - returns the number of bytes received over that connection so far
- .sq - returns the number of bytes queued in the send buffer
- .rq - returns the number of bytes queued in the receive buffer
- .ls - returns the number of seconds since the connection last sent data
- .lr - returns the number of seconds since the connection last received data
- .mark - returns the data marked from /sockmark (data storage tied to the socket, 512 bytes max)
- .type - returns the socket type, TCP or UDP
- .saddr - returns the source address of the last received UDP packet
- .sport - return the source port of the last received UDP packet
- .to - returns the number of seconds the socket has been open
- .wserr - returns the last winsock error number that occurred on a socket
- .wsmsg - returns the last winsock error message corresponding to the .wserr error number above
- .ssl - returns $true for an SSL connection
- .pause - returns $true if a socket has been paused
- .starttls - returns $true for a STARTTLS connection
- .bindip - returns the ip address or adapter name used when binding IP
- .bindport - returns the port name used when binding IP
Example
//echo -a $sock(*,1)
Compatibility
Added: mIRC v5.3
Added on: 13 Dec 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See also
mIRC identifier list