]> git.sesse.net Git - vlc/blobdiff - share/lua/README.txt
Remove timeout parameter from lua listner:accept().
[vlc] / share / lua / README.txt
index bcafa1b8b93dfc65a2e616e99efcbd64a4936e25..1257d4eb030ea00a049e2e4916d0b6471f7d353f 100644 (file)
@@ -112,12 +112,13 @@ net.url_parse( url, [option delimiter] ): Parse URL. Returns a table with
   fields "protocol", "username", "password", "host", "port", path" and
   "option".
 net.listen_tcp( host, port ): Listen to TCP connections. This returns an
-  object with an accept and an fds method. The accept takes an optional timeout
-  argument (in milliseconds). The fds method returns a list of fds you can call
-  select on before using the accept method. For example:
+  object with an accept and an fds method. accept is blocking (Poll on the
+  fds with the net.POLLIN flag if you want to be non blockin).
+  The fds method returns a list of fds you can call select on before using
+  the accept method. For example:
 local l = vlc.net.listen_tcp( "localhost", 1234 )
 while true do
-  local fd = l:accept( 500 )
+  local fd = l:accept()
   if fd >= 0 do
     net.send( fd, "blabla" )
     net.close( fd )