1 Business logic
For example, peer1 and peer2 communicate with each other
peer1 sends the message "I want the latest block" to peer2 through onopen{ write(Mesage(QUERY_LATEST))}.
peer2 receives the message through onMessage and processes the message through the handleMessage method.
handleMessage is processed according to the message type
RESPONSE_BLOCKCHAIN: Return to the blockchain. RESPONSE_BLOCKCHAIN processing enters handleBlockChainResponse(receivedLatestBlock). The latest block returned is the latest block in my local area.