Nim-LibP2P Copyright (c) 2019 Status Research & Development GmbH
- Licensed under either of
- Apache License, version 2.0, (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option. This file may not be copied, modified, or distributed except according to those terms.
Types
InvalidMplexMsgType = object of MuxerError
- Source Edit
MessageType {.pure.} = enum New, MsgIn, MsgOut, CloseIn, CloseOut, ResetIn, ResetOut
- Source Edit
Msg = tuple[id: uint64, msgType: MessageType, data: seq[byte]]
- Source Edit
Consts
MaxMsgSize = 1048576
- Source Edit
Procs
proc newInvalidMplexMsgType(): ref InvalidMplexMsgType {....raises: [Defect], tags: [].}
- Source Edit
proc readMsg(conn: Connection): Future[Msg] {....gcsafe, stackTrace: false, ...gcsafe, raises: [Defect], raises: [Defect], tags: [RootEffect].}
- Source Edit
proc writeMsg(conn: Connection; id: uint64; msgType: MessageType; data: seq[byte] = @[]): Future[void] {....raises: [Defect], tags: [].}
- Source Edit
proc writeMsg(conn: Connection; id: uint64; msgType: MessageType; data: string): Future[ void] {....raises: [Defect], tags: [].}
- Source Edit