TSSLServerSocket

A server transport implementation using SSL-encrypted sockets.

Note: On Posix systems which do not have the BSD-specific SO_NOSIGPIPE flag, you might want to ignore the SIGPIPE signal, as OpenSSL might try to write to a closed socket if the peer disconnects abruptly:

import core.stdc.signal;
import core.sys.posix.signal;
signal(SIGPIPE, SIG_IGN);

See: thrift.transport.ssl.

Constructors

this
this(ushort port, TSSLContext sslContext)

Creates a new TSSLServerSocket.

this
this(ushort port, Duration sendTimeout, Duration recvTimeout, TSSLContext sslContext)

Creates a new TSSLServerSocket.

Members

Functions

createTSocket
TSocket createTSocket(Socket socket)
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From TServerSocket

port
ushort port()

The port the server socket listens at.

sendTimeout
void sendTimeout(Duration sendTimeout)

The socket sending timeout, zero to block infinitely.

recvTimeout
void recvTimeout(Duration recvTimeout)

The socket receiving timeout, zero to block infinitely.

retryLimit
void retryLimit(ushort retryLimit)

The maximum number of listening retries if it fails.

retryDelay
void retryDelay(Duration retryDelay)

The delay between a listening attempt failing and retrying it.

tcpSendBuffer
void tcpSendBuffer(int tcpSendBuffer)

The size of the TCP send buffer, in bytes.

tcpRecvBuffer
void tcpRecvBuffer(int tcpRecvBuffer)

The size of the TCP receiving buffer, in bytes.

ipv6Only
void ipv6Only(bool value)

Whether to listen on IPv6 only, if IPv6 support is detected (default: false).

listen
void listen()
Undocumented in source. Be warned that the author may not have intended to support it.
close
void close()
Undocumented in source. Be warned that the author may not have intended to support it.
isListening
bool isListening()
Undocumented in source. Be warned that the author may not have intended to support it.
ACCEPT_BACKLOG
enum ACCEPT_BACKLOG;

Number of connections listen() backlogs.

accept
TTransport accept(TCancellation cancellation)
Undocumented in source. Be warned that the author may not have intended to support it.
createTSocket
TSocket createTSocket(Socket socket)

Allows derived classes to create a different TSocket type.

Meta