startSSL method
Implementation
Future startSSL() async {
log.fine('Securing socket');
var socket = await RawSecureSocket.secure(_socket,
subscription: _subscription, onBadCertificate: (cert) => true);
log.fine('Socket is secure');
_socket = socket;
_socket.setOption(SocketOption.tcpNoDelay, true);
_subscription = _socket.listen(_onData,
onError: _onSocketError, onDone: _onSocketDone, cancelOnError: true);
_socket.writeEventsEnabled = true;
_socket.readEventsEnabled = true;
}