Kea 2.5.9
isc::tcp Namespace Reference

Classes

class  MtTcpListenerMgr
 Manages a thread-pool that is used to drive a TcpListener. More...
 
class  TcpConnection
 Accepts and handles a single TCP connection. More...
 
class  TcpConnectionError
 Generic error reported within TcpConnection class. More...
 
class  TcpConnectionPool
 Pool of active TCP connections. More...
 
class  TcpListener
 Implements a class that listens for, accepts, and manages TCP connections. More...
 
class  TcpListenerError
 A generic error raised by the TcpListener class. More...
 
class  TcpMessage
 Base class for TCP messages. More...
 
class  TcpRequest
 Abstract class used to receive an inbound message. More...
 
class  TcpResponse
 Abstract class used to create and send an outbound response. More...
 
class  TcpStreamRequest
 Implement a simple length:data input stream message. More...
 
class  TcpStreamResponse
 Implements a simple length:data output stream message. More...
 

Typedefs

typedef boost::shared_ptr< MtTcpListenerMgrMtTcpListenerMgrPtr
 Defines a shared pointer to MtTcpListenerMgr.
 
typedef asiolink::TCPAcceptor< TcpConnectionAcceptorCallbackTcpConnectionAcceptor
 Type of the TCP acceptor used in this library.
 
typedef std::function< void(const boost::system::error_code &)> TcpConnectionAcceptorCallback
 Type of the callback for the TCP acceptor used in this library.
 
typedef boost::shared_ptr< TcpConnectionAcceptorTcpConnectionAcceptorPtr
 Type of shared pointer to TCP acceptors.
 
typedef std::function< bool(const boost::asio::ip::tcp::endpoint &)> TcpConnectionFilterCallback
 Type of the callback for filtering new connections by ip address.
 
typedef std::list< TcpConnectionPtrTcpConnectionList
 Type of TCP connection pointer list.
 
typedef boost::shared_ptr< TcpConnectionTcpConnectionPtr
 Pointer to the TcpConnection.
 
typedef std::function< TcpListenerPtr(const asiolink::IOServicePtr &io_service, const asiolink::IOAddress &server_address, const unsigned short server_port, const asiolink::TlsContextPtr &tls_context, const TcpListener::IdleTimeout &idle_timeout, const TcpConnectionFilterCallback &connection_filter) > TcpListenerFactory
 Defines a factory function for creating TcpListeners.
 
typedef boost::shared_ptr< TcpListenerTcpListenerPtr
 Pointer to a TcpListener.
 
typedef boost::shared_ptr< TcpRequestTcpRequestPtr
 Defines a smart pointer to a TcpRequest.
 
typedef boost::shared_ptr< TcpResponseTcpResponsePtr
 
typedef boost::shared_ptr< TcpStreamRequestTcpStreamRequestPtr
 Pointer to a TcpStreamRequest.
 
typedef boost::shared_ptr< TcpStreamResponseTcpStreamResponsePtr
 Pointer to a TcpStreamResponse.
 
typedef asiolink::TLSAcceptor< TcpConnectionAcceptorCallbackTlsConnectionAcceptor
 Type of the TLS acceptor used in this library.
 
typedef boost::shared_ptr< TlsConnectionAcceptorTlsConnectionAcceptorPtr
 Type of shared pointer to TLS acceptors.
 
typedef std::vector< uint8_t > WireData
 Defines a data structure for storing raw bytes of data on the wire.
 
typedef boost::shared_ptr< WireDataWireDataPtr
 

Variables

const isc::log::MessageID MT_TCP_LISTENER_MGR_STARTED = "MT_TCP_LISTENER_MGR_STARTED"
 
const isc::log::MessageID MT_TCP_LISTENER_MGR_STOPPED = "MT_TCP_LISTENER_MGR_STOPPED"
 
const isc::log::MessageID MT_TCP_LISTENER_MGR_STOPPING = "MT_TCP_LISTENER_MGR_STOPPING"
 
const isc::log::MessageID TCP_CLIENT_REQUEST_RECEIVED = "TCP_CLIENT_REQUEST_RECEIVED"
 
const isc::log::MessageID TCP_CONNECTION_CLOSE_CALLBACK_FAILED = "TCP_CONNECTION_CLOSE_CALLBACK_FAILED"
 
const isc::log::MessageID TCP_CONNECTION_REJECTED_BY_FILTER = "TCP_CONNECTION_REJECTED_BY_FILTER"
 
const isc::log::MessageID TCP_CONNECTION_SHUTDOWN = "TCP_CONNECTION_SHUTDOWN"
 
const isc::log::MessageID TCP_CONNECTION_SHUTDOWN_FAILED = "TCP_CONNECTION_SHUTDOWN_FAILED"
 
const isc::log::MessageID TCP_CONNECTION_STOP = "TCP_CONNECTION_STOP"
 
const isc::log::MessageID TCP_CONNECTION_STOP_FAILED = "TCP_CONNECTION_STOP_FAILED"
 
const isc::log::MessageID TCP_DATA_RECEIVED = "TCP_DATA_RECEIVED"
 
const isc::log::MessageID TCP_DATA_SENT = "TCP_DATA_SENT"
 
const long TCP_IDLE_CONNECTION_TIMEOUT = 300 * 1000
 Default connection idle timeout in milliseconds.
 
const isc::log::MessageID TCP_IDLE_CONNECTION_TIMEOUT_OCCURRED = "TCP_IDLE_CONNECTION_TIMEOUT_OCCURRED"
 
isc::log::Logger tcp_logger ("tcp")
 Defines the logger used within libkea-tcp library.
 
const isc::log::MessageID TCP_PREMATURE_CONNECTION_TIMEOUT_OCCURRED = "TCP_PREMATURE_CONNECTION_TIMEOUT_OCCURRED"
 
const isc::log::MessageID TCP_REQUEST_RECEIVE_START = "TCP_REQUEST_RECEIVE_START"
 
const isc::log::MessageID TCP_REQUEST_RECEIVED_FAILED = "TCP_REQUEST_RECEIVED_FAILED"
 
const isc::log::MessageID TCP_SERVER_RESPONSE_SEND = "TCP_SERVER_RESPONSE_SEND"
 
const isc::log::MessageID TCP_SERVER_RESPONSE_SEND_DETAILS = "TCP_SERVER_RESPONSE_SEND_DETAILS"
 
const isc::log::MessageID TLS_CONNECTION_HANDSHAKE_FAILED = "TLS_CONNECTION_HANDSHAKE_FAILED"
 
const isc::log::MessageID TLS_CONNECTION_HANDSHAKE_START = "TLS_CONNECTION_HANDSHAKE_START"
 
const isc::log::MessageID TLS_REQUEST_RECEIVE_START = "TLS_REQUEST_RECEIVE_START"
 
const isc::log::MessageID TLS_SERVER_RESPONSE_SEND = "TLS_SERVER_RESPONSE_SEND"
 

Typedef Documentation

◆ MtTcpListenerMgrPtr

typedef boost::shared_ptr<MtTcpListenerMgr> isc::tcp::MtTcpListenerMgrPtr

Defines a shared pointer to MtTcpListenerMgr.

Definition at line 206 of file mt_tcp_listener_mgr.h.

◆ TcpConnectionAcceptor

Type of the TCP acceptor used in this library.

Definition at line 24 of file tcp_connection_acceptor.h.

◆ TcpConnectionAcceptorCallback

typedef std::function<void(const boost::system::error_code&)> isc::tcp::TcpConnectionAcceptorCallback

Type of the callback for the TCP acceptor used in this library.

Definition at line 21 of file tcp_connection_acceptor.h.

◆ TcpConnectionAcceptorPtr

Type of shared pointer to TCP acceptors.

Definition at line 27 of file tcp_connection_acceptor.h.

◆ TcpConnectionFilterCallback

typedef std::function<bool(const boost::asio::ip::tcp::endpoint&)> isc::tcp::TcpConnectionFilterCallback

Type of the callback for filtering new connections by ip address.

Definition at line 154 of file tcp_connection.h.

◆ TcpConnectionList

Type of TCP connection pointer list.

Definition at line 19 of file tcp_connection_pool.h.

◆ TcpConnectionPtr

typedef boost::shared_ptr<TcpConnection> isc::tcp::TcpConnectionPtr

Pointer to the TcpConnection.

Definition at line 467 of file tcp_connection.h.

◆ TcpListenerFactory

typedef std::function< TcpListenerPtr(const asiolink::IOServicePtr& io_service, const asiolink::IOAddress& server_address, const unsigned short server_port, const asiolink::TlsContextPtr& tls_context, const TcpListener::IdleTimeout& idle_timeout, const TcpConnectionFilterCallback& connection_filter) > isc::tcp::TcpListenerFactory

Defines a factory function for creating TcpListeners.

Definition at line 31 of file mt_tcp_listener_mgr.h.

◆ TcpListenerPtr

typedef boost::shared_ptr<TcpListener> isc::tcp::TcpListenerPtr

Pointer to a TcpListener.

Definition at line 164 of file tcp_listener.h.

◆ TcpRequestPtr

typedef boost::shared_ptr<TcpRequest> isc::tcp::TcpRequestPtr

Defines a smart pointer to a TcpRequest.

Definition at line 100 of file tcp_connection.h.

◆ TcpResponsePtr

typedef boost::shared_ptr<TcpResponse> isc::tcp::TcpResponsePtr

Definition at line 138 of file tcp_connection.h.

◆ TcpStreamRequestPtr

typedef boost::shared_ptr<TcpStreamRequest> isc::tcp::TcpStreamRequestPtr

Pointer to a TcpStreamRequest.

Definition at line 92 of file tcp_stream_msg.h.

◆ TcpStreamResponsePtr

Pointer to a TcpStreamResponse.

Definition at line 146 of file tcp_stream_msg.h.

◆ TlsConnectionAcceptor

Type of the TLS acceptor used in this library.

Definition at line 30 of file tcp_connection_acceptor.h.

◆ TlsConnectionAcceptorPtr

Type of shared pointer to TLS acceptors.

Definition at line 33 of file tcp_connection_acceptor.h.

◆ WireData

typedef std::vector<uint8_t> isc::tcp::WireData

Defines a data structure for storing raw bytes of data on the wire.

Definition at line 30 of file tcp_connection.h.

◆ WireDataPtr

typedef boost::shared_ptr<WireData> isc::tcp::WireDataPtr

Definition at line 31 of file tcp_connection.h.

Variable Documentation

◆ MT_TCP_LISTENER_MGR_STARTED

const isc::log::MessageID isc::tcp::MT_TCP_LISTENER_MGR_STARTED = "MT_TCP_LISTENER_MGR_STARTED"
extern

Definition at line 11 of file tcp_messages.h.

Referenced by isc::tcp::MtTcpListenerMgr::start().

◆ MT_TCP_LISTENER_MGR_STOPPED

const isc::log::MessageID isc::tcp::MT_TCP_LISTENER_MGR_STOPPED = "MT_TCP_LISTENER_MGR_STOPPED"
extern

Definition at line 12 of file tcp_messages.h.

Referenced by isc::tcp::MtTcpListenerMgr::stop().

◆ MT_TCP_LISTENER_MGR_STOPPING

const isc::log::MessageID isc::tcp::MT_TCP_LISTENER_MGR_STOPPING = "MT_TCP_LISTENER_MGR_STOPPING"
extern

Definition at line 13 of file tcp_messages.h.

Referenced by isc::tcp::MtTcpListenerMgr::stop().

◆ TCP_CLIENT_REQUEST_RECEIVED

const isc::log::MessageID isc::tcp::TCP_CLIENT_REQUEST_RECEIVED = "TCP_CLIENT_REQUEST_RECEIVED"
extern

Definition at line 14 of file tcp_messages.h.

Referenced by isc::tcp::TcpConnection::postData().

◆ TCP_CONNECTION_CLOSE_CALLBACK_FAILED

const isc::log::MessageID isc::tcp::TCP_CONNECTION_CLOSE_CALLBACK_FAILED = "TCP_CONNECTION_CLOSE_CALLBACK_FAILED"
extern

Definition at line 15 of file tcp_messages.h.

◆ TCP_CONNECTION_REJECTED_BY_FILTER

const isc::log::MessageID isc::tcp::TCP_CONNECTION_REJECTED_BY_FILTER = "TCP_CONNECTION_REJECTED_BY_FILTER"
extern

Definition at line 16 of file tcp_messages.h.

Referenced by isc::tcp::TcpConnection::acceptorCallback().

◆ TCP_CONNECTION_SHUTDOWN

const isc::log::MessageID isc::tcp::TCP_CONNECTION_SHUTDOWN = "TCP_CONNECTION_SHUTDOWN"
extern

Definition at line 17 of file tcp_messages.h.

Referenced by isc::tcp::TcpConnection::shutdownConnection().

◆ TCP_CONNECTION_SHUTDOWN_FAILED

const isc::log::MessageID isc::tcp::TCP_CONNECTION_SHUTDOWN_FAILED = "TCP_CONNECTION_SHUTDOWN_FAILED"
extern

Definition at line 18 of file tcp_messages.h.

Referenced by isc::tcp::TcpConnection::shutdownConnection().

◆ TCP_CONNECTION_STOP

const isc::log::MessageID isc::tcp::TCP_CONNECTION_STOP = "TCP_CONNECTION_STOP"
extern

Definition at line 19 of file tcp_messages.h.

Referenced by isc::tcp::TcpConnection::stopThisConnection().

◆ TCP_CONNECTION_STOP_FAILED

const isc::log::MessageID isc::tcp::TCP_CONNECTION_STOP_FAILED = "TCP_CONNECTION_STOP_FAILED"
extern

Definition at line 20 of file tcp_messages.h.

Referenced by isc::tcp::TcpConnection::stopThisConnection().

◆ TCP_DATA_RECEIVED

const isc::log::MessageID isc::tcp::TCP_DATA_RECEIVED = "TCP_DATA_RECEIVED"
extern

Definition at line 21 of file tcp_messages.h.

Referenced by isc::tcp::TcpConnection::socketReadCallback().

◆ TCP_DATA_SENT

const isc::log::MessageID isc::tcp::TCP_DATA_SENT = "TCP_DATA_SENT"
extern

Definition at line 22 of file tcp_messages.h.

Referenced by isc::tcp::TcpConnection::socketWriteCallback().

◆ TCP_IDLE_CONNECTION_TIMEOUT

const long isc::tcp::TCP_IDLE_CONNECTION_TIMEOUT = 300 * 1000

Default connection idle timeout in milliseconds.

Definition at line 21 of file mt_tcp_listener_mgr.h.

◆ TCP_IDLE_CONNECTION_TIMEOUT_OCCURRED

const isc::log::MessageID isc::tcp::TCP_IDLE_CONNECTION_TIMEOUT_OCCURRED = "TCP_IDLE_CONNECTION_TIMEOUT_OCCURRED"
extern

Definition at line 23 of file tcp_messages.h.

Referenced by isc::tcp::TcpConnection::idleTimeoutCallback().

◆ tcp_logger

◆ TCP_PREMATURE_CONNECTION_TIMEOUT_OCCURRED

const isc::log::MessageID isc::tcp::TCP_PREMATURE_CONNECTION_TIMEOUT_OCCURRED = "TCP_PREMATURE_CONNECTION_TIMEOUT_OCCURRED"
extern

Definition at line 24 of file tcp_messages.h.

◆ TCP_REQUEST_RECEIVE_START

const isc::log::MessageID isc::tcp::TCP_REQUEST_RECEIVE_START = "TCP_REQUEST_RECEIVE_START"
extern

Definition at line 26 of file tcp_messages.h.

Referenced by isc::tcp::TcpConnection::acceptorCallback().

◆ TCP_REQUEST_RECEIVED_FAILED

const isc::log::MessageID isc::tcp::TCP_REQUEST_RECEIVED_FAILED = "TCP_REQUEST_RECEIVED_FAILED"
extern

Definition at line 25 of file tcp_messages.h.

Referenced by isc::tcp::TcpConnection::postData().

◆ TCP_SERVER_RESPONSE_SEND

const isc::log::MessageID isc::tcp::TCP_SERVER_RESPONSE_SEND = "TCP_SERVER_RESPONSE_SEND"
extern

Definition at line 27 of file tcp_messages.h.

Referenced by isc::tcp::TcpConnection::doWrite().

◆ TCP_SERVER_RESPONSE_SEND_DETAILS

const isc::log::MessageID isc::tcp::TCP_SERVER_RESPONSE_SEND_DETAILS = "TCP_SERVER_RESPONSE_SEND_DETAILS"
extern

Definition at line 28 of file tcp_messages.h.

◆ TLS_CONNECTION_HANDSHAKE_FAILED

const isc::log::MessageID isc::tcp::TLS_CONNECTION_HANDSHAKE_FAILED = "TLS_CONNECTION_HANDSHAKE_FAILED"
extern

Definition at line 29 of file tcp_messages.h.

Referenced by isc::tcp::TcpConnection::handshakeCallback().

◆ TLS_CONNECTION_HANDSHAKE_START

const isc::log::MessageID isc::tcp::TLS_CONNECTION_HANDSHAKE_START = "TLS_CONNECTION_HANDSHAKE_START"
extern

Definition at line 30 of file tcp_messages.h.

Referenced by isc::tcp::TcpConnection::acceptorCallback().

◆ TLS_REQUEST_RECEIVE_START

const isc::log::MessageID isc::tcp::TLS_REQUEST_RECEIVE_START = "TLS_REQUEST_RECEIVE_START"
extern

Definition at line 31 of file tcp_messages.h.

Referenced by isc::tcp::TcpConnection::handshakeCallback().

◆ TLS_SERVER_RESPONSE_SEND

const isc::log::MessageID isc::tcp::TLS_SERVER_RESPONSE_SEND = "TLS_SERVER_RESPONSE_SEND"
extern

Definition at line 32 of file tcp_messages.h.

Referenced by isc::tcp::TcpConnection::doWrite().