disconnect method
void
disconnect()
Disconnects from all namespaces and closes transport.
Implementation
void disconnect() {
// we don't use a for loop because the length of
// `sockets` changes upon each iteration
sockets.toList().forEach((socket) {
socket.disconnect();
});
sockets.clear();
close();
}