From: Perttu Ahola Date: Sat, 18 Jun 2011 18:37:08 +0000 (+0300) Subject: lol, i have apparently used python too much... X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=3c532fff159c426322fc0c2df97f8829a5410eea;p=zefram%2Fminetest%2Fminetest_engine.git lol, i have apparently used python too much... --- diff --git a/doc/protocol.txt b/doc/protocol.txt index a9706f83..da2d3394 100644 --- a/doc/protocol.txt +++ b/doc/protocol.txt @@ -48,6 +48,7 @@ Initialization: # host: ip of server (use gethostbyname(hostname) to get from a dns name) # port: port of server function check_if_minetestserver_up($host, $port) +{ $socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); $timeout = array("sec" => 1, "usec" => 0); socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, $timeout); @@ -67,4 +68,5 @@ function check_if_minetestserver_up($host, $port) return true; } return false; +}