Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Latest commit

 

History

History
History

README.md

Outline

Peer Package

The peer package handles networking for the VM.

Network

The Network interface implements the networking portion of the required VM interface. The VM utilizes the Network interface to:

  • Set an App Gossip handler for incoming VM gossip messages
  • Set an App Request handler for incoming VM request messages
  • Send App Requests to peers in the network and specify a response handler to be called upon receiving a response or failure notification
  • Send App Gossip messages to the network

Client

The client utilizes the Network interface to send requests to peers on the network and utilizes the waitingHandler to wait until a response or failure is received from the AvalancheGo networking layer.

This allows the user of Client to treat it as if it were returning results from the network synchronously.

result, err := client.Request(nodeID, request) // Blocks until receiving a response from the network
if err != nil {
    return err
}

foo(result) // do something with the result
Morty Proxy This is a proxified and sanitized view of the page, visit original site.