# Poco::Net

# class SecureServerSocketImpl

Library: NetSSL_OpenSSL
Package: SSLSockets
Header: Poco/Net/SecureServerSocketImpl.h

## Description

The SocketImpl class for SecureServerSocket.

## Inheritance

Direct Base Classes: ServerSocketImpl

All Base Classes: ServerSocketImpl, SocketImpl, Poco::RefCountedObject

## Member Summary

Member Functions: acceptConnection, bind, close, connect, connectNB, context, listen, receiveBytes, receiveFrom, sendBytes, sendTo, sendUrgent

Inherited Functions: acceptConnection, address, available, bind, close, connect, connectNB, duplicate, error, getBlocking, getBroadcast, getKeepAlive, getLinger, getNoDelay, getOOBInline, getOption, getRawOption, getReceiveBufferSize, getReceiveTimeout, getReuseAddress, getReusePort, getSendBufferSize, getSendTimeout, init, initSocket, initialized, ioctl, lastError, listen, peerAddress, poll, receiveBytes, receiveFrom, referenceCount, release, reset, sendBytes, sendTo, sendUrgent, setBlocking, setBroadcast, setKeepAlive, setLinger, setNoDelay, setOOBInline, setOption, setRawOption, setReceiveBufferSize, setReceiveTimeout, setReuseAddress, setReusePort, setSendBufferSize, setSendTimeout, shutdown, shutdownReceive, shutdownSend, socketError, sockfd

## Constructors

### SecureServerSocketImpl

SecureServerSocketImpl(
Context::Ptr pContext
);

Creates the SecureServerSocketImpl using the given SSL context object.

## Destructor

### ~SecureServerSocketImpl

~SecureServerSocketImpl();

Destroys the SecureServerSocketImpl.

## Member Functions

### acceptConnection

SocketImpl * acceptConnection(
SocketAddress & clientAddr
);

Get the next completed connection from the socket's completed connection queue.

If the queue is empty, waits until a connection request completes.

Returns a new TCP socket for the connection with the client.

The client socket's address is returned in clientAddr.

See also: Poco::Net::SocketImpl::acceptConnection()

### bind

void bind(
const SocketAddress & address,
bool reuseAddress = false
);

Bind a local address to the socket.

This is usually only done when establishing a server socket. TCP clients should not bind a socket to a specific address.

If reuseAddress is true, sets the SO_REUSEADDR socket option.

See also: Poco::Net::SocketImpl::bind()

### close

void close();

Close the socket.

See also: Poco::Net::SocketImpl::close()

### connect

void connect(
const SocketAddress & address
);

Not supported by this kind of socket.

Throws a Poco::InvalidAccessException.

See also: Poco::Net::SocketImpl::connect()

### connect

void connect(
const SocketAddress & address,
const Poco::Timespan & timeout
);

Not supported by this kind of socket.

Throws a Poco::InvalidAccessException.

See also: Poco::Net::SocketImpl::connect()

### connectNB

void connectNB(
const SocketAddress & address
);

Not supported by this kind of socket.

Throws a Poco::InvalidAccessException.

See also: Poco::Net::SocketImpl::connectNB()

### context

Context::Ptr context() const;

Returns the SSL context used by this socket.

### listen

void listen(
int backlog = 64
);

Puts the socket into listening state.

The socket becomes a passive socket that can accept incoming connection requests.

The backlog argument specifies the maximum number of connections that can be queued for this socket.

See also: Poco::Net::SocketImpl::listen()

### receiveBytes

int receiveBytes(
void * buffer,
int length,
int flags = 0
);

Not supported by this kind of socket.

Throws a Poco::InvalidAccessException.

See also: Poco::Net::SocketImpl::receiveBytes()

### receiveFrom

int receiveFrom(
void * buffer,
int length,
SocketAddress & address,
int flags = 0
);

Not supported by this kind of socket.

Throws a Poco::InvalidAccessException.

See also: Poco::Net::SocketImpl::receiveFrom()

### sendBytes

int sendBytes(
const void * buffer,
int length,
int flags = 0
);

Not supported by this kind of socket.

Throws a Poco::InvalidAccessException.

See also: Poco::Net::SocketImpl::sendBytes()

### sendTo

int sendTo(
const void * buffer,
int length,
const SocketAddress & address,
int flags = 0
);

Not supported by this kind of socket.

Throws a Poco::InvalidAccessException.

See also: Poco::Net::SocketImpl::sendTo()

### sendUrgent

void sendUrgent(
unsigned char data
);

Not supported by this kind of socket.

Throws a Poco::InvalidAccessException.

See also: Poco::Net::SocketImpl::sendUrgent()