close([error], [sock_is_closed])
Closes the connection. Any outstanding method calls will throw the given (or default) error.
Raises
JCoreAPITimeoutException: if closing the underlying socket timed out.
Arguments
- [
error] (Exception): the reason the connection closed. - [
sock_is_closed] (bool): ifTrue, don't try to close the underlying socket. Otherwise, try to close it.