Diff

net/server.lua @ 1100:05d209ef9661

Merge with 0.4
author Matthew Wild <mwild1@gmail.com>
date Sun, 03 May 2009 01:11:21 +0100
parent 1039:cc4280f45d0e
parent 1098:37ea264e133d
child 1214:27d4cfb8fb7a
line wrap: on
line diff
--- a/net/server.lua	Sat May 02 17:03:48 2009 +0100
+++ b/net/server.lua	Sun May 03 01:11:21 2009 +0100
@@ -77,6 +77,7 @@
 local addtimer
 local closeall
 local addserver
+local getserver
 local wrapserver
 local getsettings
 local closesocket
@@ -670,6 +671,10 @@
     return handler
 end
 
+getserver = function ( port )
+	return _server[ port ];
+end
+
 removeserver = function( port )
     local handler = _server[ port ]
     if not handler then
@@ -728,7 +733,7 @@
     return _readtraffic, _sendtraffic, _readlistlen, _sendlistlen, _timerlistlen
 end
 
-local dontstop = true;
+local dontstop = true; -- thinking about tomorrow, ...
 
 setquitting = function (quit)
 	dontstop = not quit;
@@ -844,6 +849,7 @@
     closeall = closeall,
     addtimer = addtimer,
     addserver = addserver,
+    getserver = getserver,
     getsettings = getsettings,
     setquitting = setquitting,
     removeserver = removeserver,