TAsyncSSLSocketFactory

Wraps passed TAsyncSocket instances into TAsyncSSLSockets.

Typically used with TAsyncClient. As an unfortunate consequence of the async client design, the passed transports cannot be statically verified to be of type TAsyncSocket. Instead, the type is verified at runtime – if a transport of an unexpected type is passed to getTransport(), it fails, throwing a TTransportException.

Constructors

this
this(TSSLContext context)

Members

Functions

getTransport
TAsyncSSLSocket getTransport(TTransport transport)
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From TTransportFactory

getTransport
TTransport getTransport(TTransport trans)

Default implementation does nothing, just returns the transport given.

Examples

auto context = nwe TSSLContext();
... // Configure SSL context.
auto factory = new TAsyncSSLSocketFactory(context);

auto socket = new TAsyncSocket(someAsyncManager, host, port);
socket.open();

auto client = new TAsyncClient!Service(transport, factory,
  new TBinaryProtocolFactory!());

Meta