#include <connection.h>

Public Member Functions | |
| virtual void | run (istream_t &in, ostream_t &out) const |
| virtual void | run (istream_t &in) const |
| virtual void | run (ostream_t &out) const |
Protected Member Functions | |
| void | run (socket_t socket) const |
| void | runin (socket_t socket) const |
| void | runout (socket_t socket) const |
| virtual void stool::basic_connection< istream_t, ostream_t >::run | ( | istream_t & | in, | |
| ostream_t & | out | |||
| ) | const [inline, virtual] |
Implement the run(istream&, ostream&) to handle connections on the server. Either sub class the connection_base directly or use one of the provided sub classes or connection_handler classes to handle new client connections. For the thread_single and thread_multi threading models, you override this function and send data to the client through the out stream and receive data through the in stream. If you need to handle in and out in separate threads, use the thread_multisplit and implement the two separate functions run(istream&) and run(ostream&). The default implementation doesn't do anything, it will immediately exit and shut down the connection.
| in | The input stream for the connection. This is connected to the remote client's output stream. | |
| out | The output stream for the connection. This is connected to the remote client's input stream. |
| virtual void stool::basic_connection< istream_t, ostream_t >::run | ( | istream_t & | in | ) | const [inline, virtual] |
Override this when using the thread_multisplit model. The run(std::istream&) and the run(std::ostream&) will both be called when using the the thread_multisplit model. Each of them are called by a seperate thread. Care must be taken to check for concurrency issues when using the multithreaded models. When both run() functions have returned the connection will be shut down.
| in | The input stream for the connection. This is connected to the remote client's output stream. |
| virtual void stool::basic_connection< istream_t, ostream_t >::run | ( | ostream_t & | out | ) | const [inline, virtual] |
Override this when using the thread_multisplit model The run(std::istream&) and the run(std::ostream&) will both be called when using the the thread_multisplit model. Each of them are called by a seperate thread. Care must be taken to check for concurrency issues when using the multithreaded models. When both run() functions have returned the connection will be shut down.
| out | The output stream for the connection. This is connected to the remote client's input stream. |
| void stool::basic_connection< istream_t, ostream_t >::run | ( | socket_t | socket | ) | const [inline, protected, virtual] |
| void stool::basic_connection< istream_t, ostream_t >::runin | ( | socket_t | socket | ) | const [inline, protected, virtual] |
| void stool::basic_connection< istream_t, ostream_t >::runout | ( | socket_t | socket | ) | const [inline, protected, virtual] |
| Try, 30 Days Free! |
|
To download OSL, Windows Mac OS X Universal Linux x86_64 Linux i386 Linux PPC |