close method
Implementation
Future<dynamic> close() async {
if (!_messageController.isClosed) {
sendMessage(kNamespaceConnection, {
'type': 'CLOSE',
});
try {
await _socket.flush();
} catch (_error) {}
}
return _socket.close();
}