Uses of Class
com.privatechain.network.rpc.MessageCodec.NetworkMessage
Packages that use MessageCodec.NetworkMessage
Package
Description
Netty TCP server, client, and NDJSON message codec — the transport layer of the
P2P networking stack (FR-NET-01, ADR-001).
-
Uses of MessageCodec.NetworkMessage in com.privatechain.network.rpc
Methods in com.privatechain.network.rpc that return MessageCodec.NetworkMessageModifier and TypeMethodDescriptionMessageCodec.blockMessage(String senderId, Block block) Creates aBLOCKmessage carrying the given block.MessageCodec.decode(byte[] bytes) Decodes a UTF-8 JSON byte array into aMessageCodec.NetworkMessage.MessageCodec.decodeFromString(String json) Decodes a JSON string into aMessageCodec.NetworkMessage.MessageCodec.getBlocksMessage(String senderId, int fromHeight, int toHeight) Creates aGET_BLOCKSmessage requesting blocks in a height range.MessageCodec.getStatusMessage(String senderId) Creates aGET_STATUSmessage requesting a peer's current chain height.MessageCodec.pingMessage(String senderId) Creates aPINGheartbeat request message.MessageCodec.pongMessage(String senderId) Creates aPONGheartbeat response message.MessageCodec.statusMessage(String senderId, int chainHeight) Creates aSTATUSmessage reporting this node's chain height.MessageCodec.transactionMessage(String senderId, Transaction transaction) Creates aTRANSACTIONmessage carrying the given transaction.Methods in com.privatechain.network.rpc that return types with arguments of type MessageCodec.NetworkMessageModifier and TypeMethodDescriptionNodeClient.sendAndReceive(Peer peer, MessageCodec.NetworkMessage message) Sends a message to the given peer and blocks until a response is received.Methods in com.privatechain.network.rpc with parameters of type MessageCodec.NetworkMessageModifier and TypeMethodDescriptionbyte[]MessageCodec.encode(MessageCodec.NetworkMessage message) Encodes aMessageCodec.NetworkMessageto a UTF-8 JSON byte array.MessageCodec.encodeToString(MessageCodec.NetworkMessage message) Encodes aMessageCodec.NetworkMessageto a UTF-8 JSON string.MessageCodec.extractBlock(MessageCodec.NetworkMessage message) Extracts and deserializes aBlockfrom the payload of aBLOCKmessage.intMessageCodec.extractChainHeight(MessageCodec.NetworkMessage message) Extracts the chain height from the payload of aSTATUSmessage.MessageCodec.extractTransaction(MessageCodec.NetworkMessage message) Extracts and deserializes aTransactionfrom the payload of aTRANSACTIONmessage.booleanNodeClient.send(Peer peer, MessageCodec.NetworkMessage message) Sends a message to the given peer without waiting for a response.NodeClient.sendAndReceive(Peer peer, MessageCodec.NetworkMessage message) Sends a message to the given peer and blocks until a response is received.