mirror of
https://github.com/logos-storage/swarmsim.git
synced 2026-02-12 18:03:07 +00:00
20 lines
513 B
Nim
20 lines
513 B
Nim
import ./types
|
|
import ./eventdrivenengine
|
|
|
|
export eventdrivenengine
|
|
export Protocol
|
|
export Message
|
|
|
|
method uncheckedDeliver(
|
|
self: Protocol,
|
|
message: Message,
|
|
engine: EventDrivenEngine,
|
|
network: Network
|
|
): void {.base.} =
|
|
raise newException(CatchableError, "Method without implementation override")
|
|
|
|
proc deliver*(self: Protocol, message: Message, engine: EventDrivenEngine,
|
|
network: Network): void =
|
|
assert(self.protocolId == message.protocolId)
|
|
self.uncheckedDeliver(message, engine, network)
|