Difference between revisions of "Sockaccept"
From Scriptwiki
m (Else statement in examples) |
|||
Line 9: | Line 9: | ||
[[Sockrename]] Check MyWebServerConnection $+ $ticks | [[Sockrename]] Check MyWebServerConnection $+ $ticks | ||
} | } | ||
+ | else { sockclose Check } | ||
} | } | ||
[[Category:Socket]] | [[Category:Socket]] |
Revision as of 19:05, 9 May 2008
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 } }