Sockaccept

From Scriptwiki
Revision as of 19:05, 9 May 2008 by Aca20031 (talk | contribs) (Else statement in examples)

Jump to: navigation, search

The sockaccept command assigns a TCP socket name to an incoming connection in an On socklisten event

sockaccept <name>

Examples

on *:SOCKLISTEN:MyWebServer: {
 sockaccept Check
 if ($sock(check).ip == allowedIP) {
   Sockrename Check MyWebServerConnection $+ $ticks
 }
 else { sockclose Check }
}