Poco

namespace Net

Overview

Namespaces: Impl

Classes: AbstractHTTPRequestHandler, AddressFamily, AddressFamilyMismatchException, ConnectionAbortedException, ConnectionRefusedException, ConnectionResetException, DNS, DNSException, DatagramSocket, DatagramSocketImpl, DialogSocket, ErrorNotification, EscapeHTMLIOS, EscapeHTMLOutputStream, EscapeHTMLStreamBuf, FTPClientSession, FTPException, FTPPasswordProvider, FTPStreamFactory, FilePartSource, FilePartStore, FilePartStoreFactory, HTMLForm, HTMLFormException, HTTPAuthenticationParams, HTTPBasicCredentials, HTTPBufferAllocator, HTTPChunkedIOS, HTTPChunkedInputStream, HTTPChunkedOutputStream, HTTPChunkedStreamBuf, HTTPClientSession, HTTPCookie, HTTPCredentials, HTTPDigestCredentials, HTTPException, HTTPFixedLengthIOS, HTTPFixedLengthInputStream, HTTPFixedLengthOutputStream, HTTPFixedLengthStreamBuf, HTTPHeaderIOS, HTTPHeaderInputStream, HTTPHeaderOutputStream, HTTPHeaderStreamBuf, HTTPIOS, HTTPInputStream, HTTPMessage, HTTPNTLMCredentials, HTTPOutputStream, HTTPRequest, HTTPRequestHandler, HTTPRequestHandlerFactory, HTTPResponse, HTTPResponseIOS, HTTPResponseStream, HTTPResponseStreamBuf, HTTPServer, HTTPServerConnection, HTTPServerConnectionFactory, HTTPServerParams, HTTPServerRequest, HTTPServerRequestImpl, HTTPServerResponse, HTTPServerResponseImpl, HTTPServerSession, HTTPSession, HTTPSessionFactory, HTTPSessionInstantiator, HTTPStreamBuf, HTTPStreamFactory, HostEntry, HostNotFoundException, ICMPClient, ICMPEventArgs, ICMPException, ICMPFragmentationException, ICMPPacket, ICMPPacketImpl, ICMPSocket, ICMPSocketImpl, ICMPv4PacketImpl, IPAddress, IdleNotification, InterfaceNotFoundException, InvalidAddressException, InvalidSocketException, MailIOS, MailInputStream, MailMessage, MailOutputStream, MailRecipient, MailStreamBuf, MediaType, MessageException, MessageHeader, MulticastSocket, MultipartException, MultipartIOS, MultipartInputStream, MultipartReader, MultipartSource, MultipartStreamBuf, MultipartWriter, NTLMContext, NTLMCredentials, NTPClient, NTPEventArgs, NTPException, NTPPacket, NameValueCollection, NetException, NetworkInterface, NoAddressFoundException, NoMessageException, NotAuthenticatedException, NullPartHandler, OAuth10Credentials, OAuth20Credentials, POP3ClientSession, POP3Exception, ParallelSocketAcceptor, ParallelSocketReactor, PartHandler, PartSource, PartStore, PartStoreFactory, PollSet, QuotedPrintableDecoder, QuotedPrintableDecoderBuf, QuotedPrintableDecoderIOS, QuotedPrintableEncoder, QuotedPrintableEncoderBuf, QuotedPrintableEncoderIOS, RawSocket, RawSocketImpl, ReadableNotification, RemoteSyslogChannel, RemoteSyslogListener, SMTPChannel, SMTPClientSession, SMTPException, SSPINTLMCredentials, ServerSocket, ServerSocketImpl, ServiceNotFoundException, ShutdownNotification, Socket, SocketAcceptor, SocketAddress, SocketConnector, SocketIOS, SocketImpl, SocketInputStream, SocketNotification, SocketNotifier, SocketOutputStream, SocketProactor, SocketReactor, SocketStream, SocketStreamBuf, StreamSocket, StreamSocketImpl, StringPartSource, TCPServer, TCPServerConnection, TCPServerConnectionFactory, TCPServerConnectionFactoryImpl, TCPServerConnectionFilter, TCPServerDispatcher, TCPServerParams, TimeoutNotification, UDPClient, UDPServerParams, UDPSocketReader, UnsupportedFamilyException, UnsupportedRedirectException, WebSocket, WebSocketException, WebSocketImpl, WritableNotification, sizeof, sizeof, sizeof, sizeof

Types: SocketBufVec, UDPMsgSizeT, sizeof

Types Aliases: HTTPBasicStreamBuf, UDPMultiServer, UDPServer

Functions: SocketBufVecSize, htmlize, initializeNetwork, swap, uninitializeNetwork

Namespaces

namespace Impl

Classes

class AbstractHTTPRequestHandler

The abstract base class for AbstractHTTPRequestHandlers created by HTTPServer

struct AddressFamily

AddressFamily::Family replaces the previously used IPAddress::Family enumeration and is now used for IPAddress::Family and SocketAddress::Family

class AddressFamilyMismatchException

 

class ConnectionAbortedException

 

class ConnectionRefusedException

 

class ConnectionResetException

 

class DNS

This class provides an interface to the domain name service. 

class DNSException

 

class DatagramSocket

This class provides an interface to an UDP stream socket. 

class DatagramSocketImpl

This class implements an UDP socket. 

class DialogSocket

DialogSocket is a subclass of StreamSocket that can be used for implementing request-response based client server connections. 

class ErrorNotification

This notification is sent if a socket has signalled an error. 

class EscapeHTMLIOS

The base class for EscapeHTMLOutputStream

class EscapeHTMLOutputStream

This stream replaces all occurrences of special HTML characters < > " & with their respective character entities &lt; &gt; &quot; &amp;. 

class EscapeHTMLStreamBuf

This stream buffer replaces all occurrences of special HTML characters < > " & with their respective character entities &lt; &gt; &quot; &amp;. 

class FTPClientSession

This class implements an File Transfer Protocol (FTP, RFC 959) client. 

class FTPException

 

class FTPPasswordProvider

The base class for all password providers. 

class FTPStreamFactory

An implementation of the URIStreamFactory interface that handles File Transfer Protocol (ftp) URIs. 

class FilePartSource

An implementation of PartSource for plain files. 

class FilePartStore

An implementation of PartSource for persisting parts (usually email attachment files) to the file system. 

class FilePartStoreFactory

 

class HTMLForm

HTMLForm is a helper class for working with HTML forms, both on the client and on the server side. 

class HTMLFormException

 

class HTTPAuthenticationParams

Collection of name-value pairs of HTTP authentication header (i. 

class HTTPBasicCredentials

This is a utility class for working with HTTP Basic Authentication in HTTPRequest objects. 

class HTTPBufferAllocator

A BufferAllocator for HTTP streams. 

class HTTPChunkedIOS

The base class for HTTPInputStream

class HTTPChunkedInputStream

This class is for internal use by HTTPSession only. 

class HTTPChunkedOutputStream

This class is for internal use by HTTPSession only. 

class HTTPChunkedStreamBuf

This is the streambuf class used for reading and writing HTTP message bodies in chunked transfer coding. 

class HTTPClientSession

This class implements the client-side of a HTTP session. 

class HTTPCookie

This class represents a HTTP Cookie. 

class HTTPCredentials

This is a utility class for working with HTTP authentication (Basic, Digest or NTLM) in HTTPRequest objects. 

class HTTPDigestCredentials

This is a utility class for working with HTTP Digest Authentication in HTTPRequest objects. 

class HTTPException

 

class HTTPFixedLengthIOS

The base class for HTTPFixedLengthInputStream

class HTTPFixedLengthInputStream

This class is for internal use by HTTPSession only. 

class HTTPFixedLengthOutputStream

This class is for internal use by HTTPSession only. 

class HTTPFixedLengthStreamBuf

This is the streambuf class used for reading and writing fixed-size HTTP message bodies. 

class HTTPHeaderIOS

The base class for HTTPHeaderInputStream

class HTTPHeaderInputStream

This class is for internal use by HTTPSession only. 

class HTTPHeaderOutputStream

This class is for internal use by HTTPSession only. 

class HTTPHeaderStreamBuf

This is the streambuf class used for reading from a HTTP header in a HTTPSession

class HTTPIOS

The base class for HTTPInputStream

class HTTPInputStream

This class is for internal use by HTTPSession only. 

class HTTPMessage

The base class for HTTPRequest and HTTPResponse

class HTTPNTLMCredentials

This is a utility class for working with HTTP NTLMv2 Authentication in HTTPRequest objects. 

class HTTPOutputStream

This class is for internal use by HTTPSession only. 

class HTTPRequest

This class encapsulates an HTTP request message. 

class HTTPRequestHandler

The abstract base class for HTTPRequestHandlers created by HTTPServer

class HTTPRequestHandlerFactory

A factory for HTTPRequestHandler objects. 

class HTTPResponse

This class encapsulates an HTTP response message. 

class HTTPResponseIOS

 

class HTTPResponseStream

 

class HTTPResponseStreamBuf

 

class HTTPServer

A subclass of TCPServer that implements a full-featured multithreaded HTTP server. 

class HTTPServerConnection

This subclass of TCPServerConnection handles HTTP connections. 

class HTTPServerConnectionFactory

This implementation of a TCPServerConnectionFactory is used by HTTPServer to create HTTPServerConnection objects. 

class HTTPServerParams

This class is used to specify parameters to both the HTTPServer, as well as to HTTPRequestHandler objects. 

class HTTPServerRequest

This abstract subclass of HTTPRequest is used for representing server-side HTTP requests. 

class HTTPServerRequestImpl

This subclass of HTTPServerRequest is used for representing server-side HTTP requests. 

class HTTPServerResponse

This subclass of HTTPResponse is used for representing server-side HTTP responses. 

class HTTPServerResponseImpl

This subclass of HTTPServerResponse is used for representing server-side HTTP responses. 

class HTTPServerSession

This class handles the server side of a HTTP session. 

class HTTPSession

HTTPSession implements basic HTTP session management for both HTTP clients and HTTP servers. 

class HTTPSessionFactory

A factory for HTTPClientSession objects. 

class HTTPSessionInstantiator

A factory for HTTPClientSession objects. 

class HTTPStreamBuf

This is the streambuf class used for reading and writing HTTP message bodies. 

class HTTPStreamFactory

An implementation of the URIStreamFactory interface that handles Hyper-Text Transfer Protocol (http) URIs. 

class HostEntry

This class stores information about a host such as host name, alias names and a list of IP addresses. 

class HostNotFoundException

 

class ICMPClient

This class provides ICMP Ping functionality. 

class ICMPEventArgs

The purpose of the ICMPEventArgs class is to be used as template parameter to instantiate event members in ICMPClient class. 

class ICMPException

 

class ICMPFragmentationException

 

class ICMPPacket

This class is the ICMP packet abstraction. 

class ICMPPacketImpl

This is the abstract class for ICMP packet implementations. 

class ICMPSocket

This class provides an interface to an ICMP client socket. 

class ICMPSocketImpl

This class implements an ICMP socket. 

class ICMPv4PacketImpl

This class implements the ICMPv4 packet. 

class IPAddress

This class represents an internet (IP) host address. 

class IdleNotification

This notification is sent when the SocketReactor does not have any sockets to react to. 

class InterfaceNotFoundException

 

class InvalidAddressException

 

class InvalidSocketException

 

class MailIOS

The base class for MailInputStream and MailOutputStream

class MailInputStream

This class is used for reading E-Mail messages from a POP3 server. 

class MailMessage

This class represents an e-mail message for use with the SMTPClientSession and POPClientSession classes. 

class MailOutputStream

This class is used for writing E-Mail messages to a SMTP server. 

class MailRecipient

The recipient of an e-mail message. 

class MailStreamBuf

The sole purpose of this stream buffer is to replace a "\r\n. 

class MediaType

This class represents a MIME media type, consisting of a top-level type, a subtype and an optional set of parameters. 

class MessageException

 

class MessageHeader

A collection of name-value pairs that are used in various internet protocols like HTTP and SMTP. 

class MulticastSocket

A MulticastSocket is a special DatagramSocket that can be used to send packets to and receive packets from multicast groups. 

class MultipartException

 

class MultipartIOS

The base class for MultipartInputStream

class MultipartInputStream

This class is for internal use by MultipartReader only. 

class MultipartReader

This class is used to split a MIME multipart message into its single parts. 

class MultipartSource

This is a PartSource for constructing complex mail messages consisting of multiple nested parts. 

class MultipartStreamBuf

This is the streambuf class used for reading from a multipart message stream. 

class MultipartWriter

This class is used to write MIME multipart messages to an output stream. 

class NTLMContext

An opaque context class for working with SSPI NTLM authentication. 

class NTLMCredentials

This is a utility class for working with NTLMv2 Authentication. 

class NTPClient

This class provides NTP (Network Time Protocol) client functionality. 

class NTPEventArgs

The purpose of the NTPEventArgs class is to be used as template parameter to instantiate event members in NTPClient class. 

class NTPException

 

class NTPPacket

This class is the NTP packet abstraction. 

class NameValueCollection

A collection of name-value pairs that are used in various internet protocols like HTTP and SMTP. 

class NetException

 

class NetworkInterface

This class represents a network interface. 

class NoAddressFoundException

 

class NoMessageException

 

class NotAuthenticatedException

 

class NullPartHandler

A very special PartHandler that simply discards all data. 

class OAuth10Credentials

This class implements OAuth 1. 

class OAuth20Credentials

This class implements OAuth 2. 

class POP3ClientSession

This class implements an Post Office Protocol Version 3 (POP3, RFC 1939) client for receiving e-mail messages. 

class POP3Exception

 

class ParallelSocketAcceptor

This class implements the Acceptor part of the Acceptor-Connector design pattern. 

class ParallelSocketReactor

 

class PartHandler

The base class for all part or attachment handlers. 

class PartSource

This abstract class is used for adding parts or attachments to mail messages, as well as for uploading files as part of a HTML form. 

class PartStore

A parent class for part stores storing message parts. 

class PartStoreFactory

Parent factory class for part stores creation. 

class PollSet

A set of sockets that can be efficiently polled as a whole. 

class QuotedPrintableDecoder

This istream decodes all quoted-printable (see RFC 2045) encoded data read from the istream connected to it. 

class QuotedPrintableDecoderBuf

This streambuf decodes all quoted-printable (see RFC 2045) encoded data read from the istream connected to it. 

class QuotedPrintableDecoderIOS

The base class for QuotedPrintableDecoder

class QuotedPrintableEncoder

This ostream encodes all data written to it in quoted-printable encoding (see RFC 2045) and forwards it to a connected ostream. 

class QuotedPrintableEncoderBuf

This streambuf encodes all data written to it in quoted-printable encoding (see RFC 2045) and forwards it to a connected ostream. 

class QuotedPrintableEncoderIOS

The base class for QuotedPrintableEncoder

class RawSocket

This class provides an interface to a raw IP socket. 

class RawSocketImpl

This class implements a raw socket. 

class ReadableNotification

This notification is sent if a socket has become readable. 

class RemoteSyslogChannel

This Channel implements remote syslog logging over UDP according to RFC 5424 "The Syslog Protocol" and RFC 5426 "Transmission of syslog messages over UDP". 

class RemoteSyslogListener

RemoteSyslogListener implements listening for syslog messages sent over UDP, according to RFC 5424 "The Syslog Protocol" and RFC 5426 "Transmission of syslog messages over UDP". 

class SMTPChannel

This Channel implements SMTP (email) logging. 

class SMTPClientSession

This class implements an Simple Mail Transfer Protocol (SMTP, RFC 2821) client for sending e-mail messages. 

class SMTPException

 

class SSPINTLMCredentials

Support for NTLM authentication using credentials of the currently logged in user via SSPI. 

class ServerSocket

This class provides an interface to a TCP server socket. 

class ServerSocketImpl

This class implements a TCP server socket. 

class ServiceNotFoundException

 

class ShutdownNotification

This notification is sent when the SocketReactor is about to shut down. 

class Socket

Socket is the common base class for StreamSocket, ServerSocket, DatagramSocket and other socket classes. 

class SocketAcceptor

This class implements the Acceptor part of the Acceptor-Connector design pattern. 

class SocketAddress

This class represents an internet (IP) endpoint/socket address. 

class SocketConnector

This class implements the Connector part of the Acceptor-Connector design pattern. 

class SocketIOS

The base class for SocketStream, SocketInputStream and SocketOutputStream

class SocketImpl

This class encapsulates the Berkeley sockets API. 

class SocketInputStream

An input stream for reading from a socket. 

class SocketNotification

The base class for all notifications generated by the SocketReactor

class SocketNotifier

This class is used internally by SocketReactor to notify registered event handlers of socket events. 

class SocketOutputStream

An output stream for writing to a socket. 

class SocketProactor

This class implements the proactor pattern. 

class SocketReactor

This class, which is part of the Reactor pattern, implements the "Initiation Dispatcher". 

class SocketStream

An bidirectional stream for reading from and writing to a socket. 

class SocketStreamBuf

This is the streambuf class used for reading from and writing to a socket. 

class StreamSocket

This class provides an interface to a TCP stream socket. 

class StreamSocketImpl

This class implements a TCP socket. 

class StringPartSource

An implementation of PartSource for strings. 

class TCPServer

This class implements a multithreaded TCP server. 

class TCPServerConnection

The abstract base class for TCP server connections created by TCPServer

class TCPServerConnectionFactory

A factory for TCPServerConnection objects. 

class TCPServerConnectionFactoryImpl

This template provides a basic implementation of TCPServerConnectionFactory

class TCPServerConnectionFilter

A TCPServerConnectionFilter can be used to reject incoming connections before passing them on to the TCPServerDispatcher and starting a thread to handle them. 

class TCPServerDispatcher

A helper class for TCPServer that dispatches connections to server connection threads. 

class TCPServerParams

This class is used to specify parameters to both the TCPServer, as well as to TCPServerDispatcher objects. 

class TimeoutNotification

This notification is sent if no other event has occurred for a specified time. 

class UDPClient

UDP client can either send, or send/receive UDP packets. 

class UDPServerParams

A class encapsulating UDP server parameters. 

class UDPSocketReader

UDPSocketReader is responsible for UDP socket I/O operations. 

class UnsupportedFamilyException

 

class UnsupportedRedirectException

 

class WebSocket

This class implements a WebSocket according to the WebSocket protocol specification in RFC 6455

class WebSocketException

 

class WebSocketImpl

This class implements a WebSocket, according to the WebSocket protocol described in RFC 6455

class WritableNotification

This notification is sent if a socket has become writable. 

class sizeof

MultiSocketPoller, as its name indicates, repeatedly polls a set of sockets for readability and/or error. 

class sizeof

SingleSocketPoller, as its name indicates, repeatedly polls a single socket for readability; if the socket is readable, the reading action is delegated to the reader. 

class sizeof

UDP handler handles the data that arrives to the UDP server. 

class sizeof

UDP server, runs in its own thread and owns a poller, to which data arrival and discovery is delegated. 

Types

SocketBufVec

typedef std::vector < SocketBuf > SocketBufVec;

UDPMsgSizeT

typedef int UDPMsgSizeT;

sizeof

typedef UDPHandlerImpl < 1472 + sizeof (UDPMsgSizeT)+ SocketAddress::MAX_ADDRESS_LENGTH > UDPHandler;

Types Aliases

HTTPBasicStreamBuf

using HTTPBasicStreamBuf = Poco::BasicBufferedStreamBuf < char, std::char_traits < char >, HTTPBufferAllocator >;

UDPMultiServer

using UDPMultiServer = UDPServerImpl < 1472 + sizeof (UDPMsgSizeT)+ SocketAddress::MAX_ADDRESS_LENGTH, MultiSocketPoller < 1472 + sizeof (UDPMsgSizeT)+ SocketAddress::MAX_ADDRESS_LENGTH >>;

UDPServer

using UDPServer = UDPServerImpl < 1472 + sizeof (UDPMsgSizeT)+ SocketAddress::MAX_ADDRESS_LENGTH, SingleSocketPoller < 1472 + sizeof (UDPMsgSizeT)+ SocketAddress::MAX_ADDRESS_LENGTH >>;

Functions

SocketBufVecSize inline

inline int SocketBufVecSize(
    const SocketBufVec & sbv
);

Returns total length of all SocketBufs in the vector.

htmlize

std::string htmlize(
    const std::string & str
);

Returns a copy of html with reserved HTML characters (<, >, ", &) propery escaped.

initializeNetwork

void initializeNetwork();

Initialize the network subsystem. (Windows only, no-op elsewhere)

swap inline

inline void swap(
    HostEntry & h1,
    HostEntry & h2
) noexcept;

swap inline

inline void swap(
    MailRecipient & r1,
    MailRecipient & r2
) noexcept;

swap inline

inline void swap(
    MediaType & m1,
    MediaType & m2
) noexcept;

swap inline

inline void swap(
    NameValueCollection & nvc1,
    NameValueCollection & nvc2
) noexcept;

uninitializeNetwork

void uninitializeNetwork();

Uninitialize the network subsystem. (Windows only, no-op elsewhere)