From WikiChip
Editing mirc/identifiers/$sockerr
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.
Latest revision | Your text | ||
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. | ||
− | + | For example, in the {{mIRC|on events/on sockopen|on sockopen}} event, if the connection is not established, $sockerr is set | |
+ | |||
+ | Inside the on sockopen event: | ||
+ | * '''0''' - Success. | ||
+ | * '''3''' - Failure establishing socket connection: $sock($sockname).wsmsg will contain a more specific error message. | ||
+ | * '''4''' - Error resolving given hostname. | ||
+ | |||
== Synopsis == | == Synopsis == | ||
Line 11: | Line 17: | ||
== Properties == | == Properties == | ||
None | None | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Example == | == Example == | ||
<source lang="mIRC">on *:sockread:name:{ | <source lang="mIRC">on *:sockread:name:{ | ||
if ($sockerr) return | if ($sockerr) return | ||
− | + | ... | |
}</source> | }</source> | ||