From WikiChip
Difference between revisions of "mirc/identifiers/$sockerr"
m |
(Added error codes from http://www.xise.nl/mirc/wiki/doku.php/doku.php?id=sockerr) |
||
Line 1: | Line 1: | ||
{{mirc title|$sockerr identifier}}'''$sockerr''' returns the sock error number if an error occurred. | {{mirc title|$sockerr identifier}}'''$sockerr''' returns the sock error number if an error occurred. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Synopsis == | == Synopsis == | ||
Line 17: | Line 9: | ||
== Properties == | == Properties == | ||
None | None | ||
+ | |||
+ | == Error codes == | ||
+ | === on SOCKOPEN === | ||
+ | * 0: success | ||
+ | * 3: failure establishing socket connection (W) | ||
+ | * 4: error resolving given hostname | ||
+ | |||
+ | === on SOCKLISTEN === | ||
+ | * 0: new socket successfully accepted | ||
+ | * 1: error occurred on listening socket (W) | ||
+ | * 2: error accepting new socket (W) | ||
+ | * 4: not enough memory for new socket | ||
+ | |||
+ | === on SOCKREAD === | ||
+ | * 0: data received | ||
+ | * 3: error on connected socket occurred (W) | ||
+ | |||
+ | === on SOCKWRITE === | ||
+ | * 0: all data successfully written | ||
+ | * 3: error trying to send data (W) | ||
+ | |||
+ | === on SOCKCLOSE === | ||
+ | * 0: EOF from other end received | ||
+ | * 3: an error occurred while receiving data, or a SSL error occurred (W) | ||
+ | * 5: a certain(?) SSL error occurred during sockopen | ||
+ | |||
+ | '''Note 1:''' (W) = For this error, $sock().wserr contains a specific WinSock error number and $sock().wsmsg the Winsock error text | ||
+ | |||
+ | '''Note 2:''' These codes were taken from http://www.xise.nl/mirc/wiki/doku.php/doku.php?id=sockerr | ||
== Example == | == Example == |
Revision as of 17:14, 8 December 2018
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$sockerr returns the sock error number if an error occurred.
Contents
Synopsis
$sockerr
Parameters
None
Properties
None
Error codes
on SOCKOPEN
- 0: success
- 3: failure establishing socket connection (W)
- 4: error resolving given hostname
on SOCKLISTEN
- 0: new socket successfully accepted
- 1: error occurred on listening socket (W)
- 2: error accepting new socket (W)
- 4: not enough memory for new socket
on SOCKREAD
- 0: data received
- 3: error on connected socket occurred (W)
on SOCKWRITE
- 0: all data successfully written
- 3: error trying to send data (W)
on SOCKCLOSE
- 0: EOF from other end received
- 3: an error occurred while receiving data, or a SSL error occurred (W)
- 5: a certain(?) SSL error occurred during sockopen
Note 1: (W) = For this error, $sock().wserr contains a specific WinSock error number and $sock().wsmsg the Winsock error text
Note 2: These codes were taken from http://www.xise.nl/mirc/wiki/doku.php/doku.php?id=sockerr
Example
on *:sockread:name:{ if ($sockerr) return … }
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