nim-libp2p/libp2p/protocols/secure/secio.nim

33 lines
751 B
Nim
Raw Normal View History

2019-09-06 06:51:46 +00: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 17:33:51 +00:00
import secure,
../../connection
2019-09-06 06:51:46 +00:00
2019-09-09 17:33:51 +00:00
const SecioCodec* = "/plaintext/1.0.0"
2019-09-06 06:51:46 +00:00
type
2019-09-09 17:33:51 +00:00
Secio = ref object of Secure
2019-09-06 06:51:46 +00:00
2019-09-09 17:33:51 +00:00
proc encodeProposalMsg*() = discard
proc decodeProposalMsg*() = discard
2019-09-06 06:51:46 +00:00
2019-09-09 17:33:51 +00:00
method init(p: Secio) {.gcsafe.} =
proc handle(conn: Connection, proto: string) {.async, gcsafe.} =
discard
2019-09-06 06:51:46 +00:00
2019-09-09 17:33:51 +00:00
p.codec = SecioCodec
2019-09-06 06:51:46 +00:00
p.handler = handle
2019-09-09 17:33:51 +00:00
proc newSecio*(): Secio =
2019-09-06 06:51:46 +00:00
new result
result.init()
2019-09-09 17:33:51 +00:00