Future<RawSocket> close()

Closes the socket. Returns a Future that completes with this when the underlying connection is completely destroyed.

Calling close will never throw an exception and calling it several times is supported. Calling close can result in a RawSocketEvent.READ_CLOSED event.

Source

Future<RawSocket> close();