close method

Future close()

Closes the WebSocket connection and removes the client from the session.

Implementation

Future close() async {
  socket.close();
  manager.session.remove(id);
}