Interface P2PService.DisconnectionListener
- Enclosing interface:
P2PService
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Consumer of network disconnection events.
-
Method Summary
Modifier and TypeMethodDescriptionvoidonDisconnect(PeerConnection connection, org.apache.tuweni.bytes.Bytes disconnectionCode, String disconnectionMessage, boolean initiatedByPeer) Called when a peer connection is terminated.
-
Method Details
-
onDisconnect
void onDisconnect(PeerConnection connection, org.apache.tuweni.bytes.Bytes disconnectionCode, String disconnectionMessage, boolean initiatedByPeer) Called when a peer connection is terminated.- Parameters:
connection- the connection that was closeddisconnectionCode- the code indicating the reason for disconnectiondisconnectionMessage- a human-readable message explaining the disconnection reasoninitiatedByPeer-trueif the remote peer initiated the disconnect
-