close abstract method
Cleans up local data about the socket and explicitly closes the connection to the server ensuring that the client does not attempt to automatically reconnect.
code
is 1000
by default indicating normal closure and reason
is null
by default.
Implementation
Future<void> close([int code, String reason]);