33 lines
751 B
Nim
Raw Normal View History

2019-09-06 00:51:46 -06:00
## Nim-LibP2P
## Copyright (c) 2018 Status Research & Development GmbH
## Licensed under either of
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
## * MIT license ([LICENSE-MIT](LICENSE-MIT))
## at your option.
## This file may not be copied, modified, or distributed except according to
## those terms.
import chronos
2019-09-09 11:33:51 -06:00
import secure,
../../connection
2019-09-06 00:51:46 -06:00
2019-09-09 11:33:51 -06:00
const SecioCodec* = "/plaintext/1.0.0"
2019-09-06 00:51:46 -06:00
type
2019-09-09 11:33:51 -06:00
Secio = ref object of Secure
2019-09-06 00:51:46 -06:00
2019-09-09 11:33:51 -06:00
proc encodeProposalMsg*() = discard
proc decodeProposalMsg*() = discard
2019-09-06 00:51:46 -06:00
2019-09-09 11:33:51 -06:00
method init(p: Secio) {.gcsafe.} =
proc handle(conn: Connection, proto: string) {.async, gcsafe.} =
discard
2019-09-06 00:51:46 -06:00
2019-09-09 11:33:51 -06:00
p.codec = SecioCodec
2019-09-06 00:51:46 -06:00
p.handler = handle
2019-09-09 11:33:51 -06:00
proc newSecio*(): Secio =
2019-09-06 00:51:46 -06:00
new result
result.init()
2019-09-09 11:33:51 -06:00