close method
Closes the connection to the Tor proxy.
Returns: A Future that resolves to void.
Implementation
Future<void> close() async {
// Ensure all data is sent before closing.
//
// TODO test this.
if (sslEnabled) {
await _socksSocket.flush();
await _secureResponseController.close();
}
await _socksSocket.flush();
await _responseController.close();
return await _socksSocket.close();
}