> As far as threads.. Was thinking that TWSocket itself would not be 
> in a thread.. However, the packet processor and relay code would 
> be.. More specifically, at the server level, buffer the incoming 
> data to some pre-determined amount, then fire off a thread to 
> process that buffer..

If you are sending the data with TWSocket as well, that will also be 
event driven, so can all run in the same thread.  It's only if your 
processing is going to block for more than a few milliseconds that you 
need to think about threads.  

I wrote an application recently (http://www.magsys.co.uk/comcap/) 
including ICS that captures and writes multiple IP streams to multiple 
disk files, relays those streams using IP, and writes them to SQL 
Server, all without any threads.  Even SQL is asynchronous, with each 
new line triggered off the write event for the last line, with a FIFO 
buffer in case data arrives faster than SQL can write it, but it handles 
50 lines a minute easily, while capturing 15 streams simultaneously.  

Angus
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to