Sockaccept

From Scriptwiki
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 }
}