#include <tcpconnectionmanager.hpp>
Collaboration diagram for MynahSA::TCPConnectionManager:
Public Member Functions | |
TCPConnectionManager (RequestResponseHandler &handler, const StreamConstructor &cons) | |
~TCPConnectionManager () | |
void | operator() (int fd) |
Design: TCPServer manages ALL incoming connections. When an incomming connection is requested the TCPServer spawns a thread to manage all I/O over that particular TCP connection. The class responsible for handling the connection is TCPConnectionManager. TCPConnectionManager performs some basic stream initialization, then proceeds to stream objects off of the stream and reconstruct them in memory. Once the in-memory image is ready, the request/response handler is invoked to transform an object received off of the stream into a response. The response is then placed back onto the stream for the client to process.
Notes: TCPConnection manager and descendant classes must be thread safe. StreamType must support copy construction.
Definition at line 43 of file tcpconnectionmanager.hpp.
|
Constructor
|
|
Destructor
|
|
operator() - takes file descriptor fd and performs TCP i/o on it.
|