mirror of https://github.com/vacp2p/nim-libp2p.git
remove generic constructor
This commit is contained in:
parent
9bc7043f48
commit
93bd7f623c
|
@ -17,14 +17,7 @@ type
|
||||||
Future[void] {.gcsafe, closure.}
|
Future[void] {.gcsafe, closure.}
|
||||||
|
|
||||||
LPProtocol* = ref object of RootObj
|
LPProtocol* = ref object of RootObj
|
||||||
peerInfo*: PeerInfo
|
|
||||||
codec*: string
|
codec*: string
|
||||||
handler*: LPProtoHandler ## this handler gets invoked by the protocol negotiator
|
handler*: LPProtoHandler ## this handler gets invoked by the protocol negotiator
|
||||||
|
|
||||||
proc newProtocol*(p: typedesc[LPProtocol],
|
|
||||||
peerInfo: PeerInfo): p =
|
|
||||||
new result
|
|
||||||
result.peerInfo = peerInfo
|
|
||||||
result.init()
|
|
||||||
|
|
||||||
method init*(p: LPProtocol) {.base, gcsafe.} = discard
|
method init*(p: LPProtocol) {.base, gcsafe.} = discard
|
||||||
|
|
Loading…
Reference in New Issue