Overview
Features
Download
Documentation
Community
Add-Ons & Services

Difference between Reactor pattern and TCPServer

Please post support and help requests here.

Difference between Reactor pattern and TCPServer

Postby Sylva1n » 13 Dec 2012, 23:10

Hello,

my app has to listen to multiple clients using a TCP socket.

Can I use the Reactor pattern rather than TCPServer?

I don't understand if the Reactor pattern supports several clients...


Thank you,

Sylvain
Sylva1n
 
Posts: 4
Joined: 12 Dec 2012, 23:56

Re: Difference between Reactor pattern and TCPServer

Postby alex » 13 Dec 2012, 23:47

Sylva1n wrote:Can I use the Reactor pattern rather than TCPServer?
I don't understand if the Reactor pattern supports several clients...

It does but it will serve them serially. You can have multiple reactors, each in its own thread just make sure you coordinate well how notifications are handled.
EDIT: to be more precise, socket handles are looped over through select (poll/epoll if available). Notifications are dispatched through NotificationCenter.
alex
 
Posts: 1105
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests