Interface PeerResponseEvent

Emitted when query responses are received form remote peers. Depending on the query these events may be followed by a FinalPeerEvent, a ValueEvent or a ProviderEvent.

interface PeerResponseEvent {
    closer: PeerInfo[];
    from: PeerId;
    messageName: "PUT_VALUE" | "GET_VALUE" | "ADD_PROVIDER" | "GET_PROVIDERS" | "FIND_NODE" | "PING" | "codec";
    messageType: MessageType;
    name: "PEER_RESPONSE";
    providers: PeerInfo[];
    record?: DHTRecord;
    type: PEER_RESPONSE;
}

Properties

closer: PeerInfo[]
from: PeerId
messageName: "PUT_VALUE" | "GET_VALUE" | "ADD_PROVIDER" | "GET_PROVIDERS" | "FIND_NODE" | "PING" | "codec"
messageType: MessageType
name: "PEER_RESPONSE"
providers: PeerInfo[]
record?: DHTRecord