Project

General

Profile

Actions

On SOCKCLOSE » History » Revision 4

« Previous | Revision 4/5 (diff) | Next »
Per Amundsen, 01/30/2017 08:20 PM


Added in 1.9.0

on <level>:SOCKCLOSE:name:<commands>

Triggers when a connection is closed by the remote connection. (not by /sockclose)

Parameters

<level> - The level for the event to trigger.
<name> - The $sockname to listen to.
<commands> - The commands to be performed when the event listener's criteria is met.

See also on SOCKLISTEN, on SOCKCLOSE, on SOCKREAD, on SOCKWRITE, /socklisten, /sockopen, /sockaccept, $sock, $sockbr, $sockerr, $sockname.

Example

; Open a connection to AdiIRC.com, port 80.
/sockopen adiirc adiirc.com 80

; Make a request for the index page.
on *:SOCKOPEN:adiirc:{
  sockwrite -n adiirc GET / HTTP/1.0
  sockwrite -n adiirc Host: www.adiirc.com
  sockwrite -n adiirc 
}

on *:SOCKCLOSE:adiirc:echo -ag adiirc.com closed the connection

Updated by Per Amundsen almost 8 years ago · 4 revisions

Also available in: PDF HTML TXT