From: terry j. <ter...@fa...> - 2005-10-20 06:36:53
|
thank you for the state threads project - i would appreciate some advice on its use as i am interested in developing a publish & subcribe messaging server with ST - i.e. lots of open connections sending & receiving... - does this make sense? - pls comment on the structure below and/or recommend something as the server example is somewhat different - i.e. can i just accept & read "ahead" or should i st_poll() across all connections? - if one st thread reads & then sends on to a number of connections, if one of these is slow, then i presume this st_thread will block, preventing any further writes from happening until it has finished - how can i deal with this? - how can i benefit from additional processors when i can only listen to one port in a single physical thread? - how should a client close be properly managed? basic structure... - listens, then accepts in a loop, starting a new st thread for each connection, maintaining a list of connections - each st thread reads, processes & then goes through the list, st_writing as appropriate thanks terry -- terry johnston ter...@fa... |