W
Winston Nimchan
Hi:
I am trying to develop a server application that listens for incoming
network request and processes these requests. Processing request involves
analyzing the packet, applying business rules, updating database and
generating a response packet.
What is the best way to go about this?
I've downloaded code from the net that creates an asynchronous socket server
but I have some concerns about what I'm doing. Threads are created for each
incoming socket and when data is received on a particular socket, the
delegate is called. the problem is that if a second socket/thread receives
data while the first socket/thread is in the delegate, the second thread
waits for the first thread to exit the delegate. It might be a while before
the first thread finishes.
Is it wise to make async calls from my delegate to the objects that will be
processing the request?
Forgive me if I sound confused.
Regards
Winston
I am trying to develop a server application that listens for incoming
network request and processes these requests. Processing request involves
analyzing the packet, applying business rules, updating database and
generating a response packet.
What is the best way to go about this?
I've downloaded code from the net that creates an asynchronous socket server
but I have some concerns about what I'm doing. Threads are created for each
incoming socket and when data is received on a particular socket, the
delegate is called. the problem is that if a second socket/thread receives
data while the first socket/thread is in the delegate, the second thread
waits for the first thread to exit the delegate. It might be a while before
the first thread finishes.
Is it wise to make async calls from my delegate to the objects that will be
processing the request?
Forgive me if I sound confused.
Regards
Winston