libp2p/protocols/protocol

Search:
Group by:
Source   Edit  

Types

LPProtocol = ref object of RootObj
  codecs*: seq[string]
  handler*: LPProtoHandler   ## this handler gets invoked by the protocol negotiator
  started*: bool
  
Source   Edit  
LPProtoHandler = proc (conn: Connection; proto: string): Future[void] {....gcsafe,
    raises: [].}
Source   Edit  

Procs

func codec(p: LPProtocol): string {....raises: [], tags: [], forbids: [].}
Source   Edit  
func codec=(p: LPProtocol; codec: string) {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc maxIncomingStreams(p: LPProtocol): int {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc maxIncomingStreams=(p: LPProtocol; val: int) {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc new(T: type LPProtocol; codecs: seq[string]; handler: LPProtoHandler;
         maxIncomingStreams: Opt[int] | int = Opt.none(int)): T:type {.
    ...raises: [].}
Source   Edit  

Methods

method init(p: LPProtocol) {.base, ...gcsafe, raises: [], tags: [], forbids: [].}
Source   Edit  
method start(p: LPProtocol) {.async, base, ...raises: [], tags: [], forbids: [].}
Source   Edit  
method stop(p: LPProtocol) {.async, base, ...raises: [], tags: [], forbids: [].}
Source   Edit