WaterSweet / mochiweb

Automatically exported from code.google.com/p/mochiweb
Other
0 stars 0 forks source link

Ability to giveup control of a socket #74

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This diff adds the ability to transfer control of a socket to a process other 
than the socket server. Socket can still be used by all processes but if socket 
option `active` is set to either `once` or `true`, then tcp events related to 
that socket will be delivered to the specified process. 

This is useful in embedded scenarios where the host application wants to add 
custom functionality that requires socket control. For instance, a comet server 
can use this to detect when clients close the connection by processing 
tcp_closed messages.

Original issue reported on code.google.com by alire...@gmail.com on 8 Jun 2010 at 6:18

Attachments:

GoogleCodeExporter commented 8 years ago
I don't understand why you would want to do this when the loop function is 
called in-process with the socket as an argument. You can do this on your own, 
there's no reason to do it from mochiweb_socket_server.

Original comment by bob.ippo...@gmail.com on 9 Jun 2010 at 3:38