The place we send messages that we successfully parsed from our peer on the P2P network. This is mostly likely a org.bitcoins.node.networking.peer.PeerMessageSender
The place we send messages that we successfully parsed from our peer on the P2P network.
The place we send messages that we successfully parsed from our peer on the P2P network. This is mostly likely a org.bitcoins.node.networking.peer.PeerMessageSender
The manager is an actor that handles the underlying low level I/O resources (selectors, channels) and instantiates workers for specific tasks, such as listening to incoming connections.
The parameters for the network we are connected to
This context is responsible for initializing a tcp connection with a peer on the bitcoin p2p network
This context is responsible for initializing a tcp connection with a peer on the bitcoin p2p network
This actor is responsible for creating a connection, relaying messages and closing a connection to our peer on the P2P network. This is the actor that directly interacts with the p2p network. It's responsibly is to deal with low level .TCP messages.
If the client receives a NetworkMessage, from a PeerMessageSender it serializes the message to it to a akka.util.ByteString and then sends it to the internal
manager
which streams the data to our peer on the Bitcoin network.If the client receives a Tcp.Received message, it means we have received a message from our peer on the Bitcoin P2P network. This means we try to parse the bytes into a NetworkMessage. If we successfully parse the message we relay that message to the PeerMessageSender that created the Client Actor.
In this class you will see a 'unalignedBytes' value passed around in a lot of methods. This is because we cannot assume that a Bitcoin P2P message aligns with a TCP packet. For instance, a large block message (up to 4MB in size) CANNOT fit in a single TCP packet. This means we must cache the bytes and wait for the rest of them to be sent.
The place we send messages that we successfully parsed from our peer on the P2P network. This is mostly likely a org.bitcoins.node.networking.peer.PeerMessageSender