Project

General

Profile

On SOCKCLOSE » History » Revision 2

Revision 1 (Per Amundsen, 11/19/2015 09:53 AM) → Revision 2/5 (Per Amundsen, 11/19/2015 09:53 AM)

_Added in 1.9.0_ 

 *<notextile>on <level>:SOCKCLOSE:name:<commands></notextile>* 

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

 *Parameters* 

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

 _See also [[on SOCKOPEN]], [[on SOCKLISTEN]], [[on SOCKREAD]], [[on SOCKWRITE]], [[/sockopen]], [[$sock]], [[$sockname]]._ 

 


 *Example* 

 <pre> 
 ; 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 example1 GET / HTTP/1.0 
   sockwrite -n example1 Host: www.adiirc.com 
   sockwrite -n example1 
 } 

 on *:SOCKCLOSE:adiirc:echo -ag adiirc.com closed the connection 
 </pre>