#include <sys/socket.h>
#include <sys/poll.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netdb.h>
#include <unistd.h>
#include <pthread.h>
#include <cerrno>
#include <cstring>
#include <string>
#include <iostream>
#include <sstream>
#include <exception>


Go to the source code of this file.
Classes | |
| class | unix_buffer_exception | 
| This class provides basic exception handling.  More... | |
| class | Cprovide_descriptor_access | 
| a virtual base class to provide access to a file/socket descriptor  More... | |
| class | Cpoll_methods | 
| virtual abstraction layer for the poll system call  More... | |
| class | Cpoll | 
| abstraction layer for the poll system call  More... | |
| class | Cnetwork_connection_methods | 
| a virtual base class  More... | |
| class | connection_waiter | 
| class | unix_fd_buffer | 
| This class provides a streambuffer for handling file/socket descriptor resources.  More... | |
| class | unix_buffer | 
| This class provides a streambuffer for handling network connections.  More... | |
| class | unix_io_stream | 
| a simple network connection stream  More... | |
| class | fd_iostream | 
| iostream attached to a file descriptor (can be reduced to an istream or ostream!)  More... | |
| class | sd_iostream | 
| iostream attached to a socket descriptor (can be reduced to an istream or ostream!)  More... | |
| class | socket_piper | 
| this class provides a socket creator for unnamed pipes  More... | |
Defines | |
| #define | PTHREAD_TESTCANCEL pthread_testcancel(); | 
Functions | |
| std::string | my_strerror (const int errnum) | 
| threadsafe version of strerror that returns error message as string   | |
| int | open_internet_port (const int port, const int qsize=5) | 
| std::ostream & | operator<< (std::ostream &ostr, const sockaddr &sa) | 
| returns information about the specified socket to the given stream   | |
| std::string | peer_info (const int socket_descriptor) | 
| std::string | socket_info (const int socket_descriptor) | 
| std::string | connection_info (const int socket_descriptor) | 
| template<class T> | |
| std::string | peer_info (const T &obj) | 
| template<class T> | |
| std::string | socket_info (const T &obj) | 
| template<class T> | |
| std::string | connection_info (const T &obj) | 
Definition in file unix_buffer.H.
| #define PTHREAD_TESTCANCEL pthread_testcancel(); | 
Definition at line 33 of file unix_buffer.H.
Referenced by unix_buffer::empty_buffer(), unix_fd_buffer::empty_buffer(), unix_buffer::underflow(), and unix_fd_buffer::underflow().
| std::string connection_info | ( | const T & | obj | ) |  [inline] | 
        
| obj | an object that handles a network connection and provides the attached socket descriptor through get_descriptor()  | 
Definition at line 320 of file unix_buffer.H.
| std::string connection_info | ( | const int | socket_descriptor | ) |  [inline] | 
        
| socket_descriptor | a socket descriptor | 
Definition at line 259 of file unix_buffer.H.
| std::string my_strerror | ( | const int | errnum | ) |  [inline] | 
        
threadsafe version of strerror that returns error message as string
Definition at line 108 of file unix_buffer.H.
Referenced by unix_buffer::empty_buffer(), unix_fd_buffer::empty_buffer(), unix_buffer::underflow(), and unix_fd_buffer::underflow().
| int open_internet_port | ( | const int | port, | |
| const int |  qsize = 5 | |||
| ) | 
| port | port to listen for a tcp based network connection | |
| qsize | optional "backlog" parameter (refer "listen(2)" manpage) | 
Definition at line 138 of file unix_buffer.H.
| std::ostream& operator<< | ( | std::ostream & | ostr, | |
| const sockaddr & | sa | |||
| ) |  [inline] | 
        
returns information about the specified socket to the given stream
Definition at line 170 of file unix_buffer.H.
| std::string peer_info | ( | const T & | obj | ) |  [inline] | 
        
| obj | an object that handles a network connection and provides the attached socket descriptor through get_descriptor()  | 
Definition at line 295 of file unix_buffer.H.
| std::string peer_info | ( | const int | socket_descriptor | ) |  [inline] | 
        
| socket_descriptor | a socket descriptor | 
Definition at line 222 of file unix_buffer.H.
Referenced by Cprocess_clients::process_data_stream_ecm(), and Cprocess_clients::THREAD_process_data_stream().
| std::string socket_info | ( | const T & | obj | ) |  [inline] | 
        
| obj | an object that handles a network connection and provides the attached socket descriptor through get_descriptor()  | 
Definition at line 307 of file unix_buffer.H.
| std::string socket_info | ( | const int | socket_descriptor | ) |  [inline] | 
        
| socket_descriptor | a socket descriptor | 
Definition at line 240 of file unix_buffer.H.
 1.5.4