SokDoc

sok / Sok.Socket.TCP / TCPClientSocket / exceptionHandler

exceptionHandler

var exceptionHandler: (exception: Throwable) -> Unit (source)

Lambda that will be called when an exception resulting in the closing of the socket is thrown. This happen when calling the close or forceClose method, if the peer close the socket or if something wrong happen internally. Exception that does not affect the socket state will not be received by this handler (exception in the bulkRead operation lambda for example)

Property

exceptionHandler - Lambda that will be called when an exception resulting in the closing of the socket is thrown. This happen when calling the close or forceClose method, if the peer close the socket or if something wrong happen internally. Exception that does not affect the socket state will not be received by this handler (exception in the bulkRead operation lambda for example)