mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-09-23 14:34:49 -04:00
Extend comment on the role of Connection.InputHandler
This commit is contained in:
parent
9b9fd678a8
commit
5d78918fb2
1 changed files with 7 additions and 5 deletions
|
@ -585,7 +585,9 @@ public class Connection implements MessageListener {
|
||||||
// InputHandler
|
// InputHandler
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Runs in same thread as Connection
|
// Runs in same thread as Connection, receives a message, performs several checks on it
|
||||||
|
// (including throttling limits, validity and statistics)
|
||||||
|
// and delivers it to the message listener given in the constructor.
|
||||||
private static class InputHandler implements Runnable {
|
private static class InputHandler implements Runnable {
|
||||||
private static final Logger log = LoggerFactory.getLogger(InputHandler.class);
|
private static final Logger log = LoggerFactory.getLogger(InputHandler.class);
|
||||||
|
|
||||||
|
@ -730,13 +732,13 @@ public class Connection implements MessageListener {
|
||||||
if (!(message instanceof KeepAliveMessage))
|
if (!(message instanceof KeepAliveMessage))
|
||||||
connection.statistic.updateLastActivityTimestamp();
|
connection.statistic.updateLastActivityTimestamp();
|
||||||
|
|
||||||
// First a seed node gets a message form a peer (PreliminaryDataRequest using
|
// First a seed node gets a message from a peer (PreliminaryDataRequest using
|
||||||
// AnonymousMessage interface) which does not has its hidden service
|
// AnonymousMessage interface) which does not have its hidden service
|
||||||
// published, so does not know its address. As the IncomingConnection does not has the
|
// published, so it does not know its address. As the IncomingConnection does not have the
|
||||||
// peersNodeAddress set that connection cannot be used for outgoing messages until we
|
// peersNodeAddress set that connection cannot be used for outgoing messages until we
|
||||||
// get the address set.
|
// get the address set.
|
||||||
// At the data update message (DataRequest using SendersNodeAddressMessage interface)
|
// At the data update message (DataRequest using SendersNodeAddressMessage interface)
|
||||||
// after the HS is published we get the peers address set.
|
// after the HS is published we get the peer's address set.
|
||||||
|
|
||||||
// There are only those messages used for new connections to a peer:
|
// There are only those messages used for new connections to a peer:
|
||||||
// 1. PreliminaryDataRequest
|
// 1. PreliminaryDataRequest
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue