appcelerator/titanium_mobile — pull request #1426 by sakisakira (2012-02-15 17:09:27+00:00)
Title: Socket.TCP timeout for accept() (Android)

You can use timeout option for accept, like, socket.listen(); socket.timeout = 5
000; socket.accept();, then it wait 5 seconds for incomming connection.
It will explicitly distinct with socket.accept({timeout: 5000}).