From 746bfffb7c82a99a78b991da4620c9c83b7e9c17 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Thu, 20 Apr 2023 13:38:10 -0700 Subject: [PATCH] EngineHooks into enginehooks.go --- protocol/connections/engine.go | 4 ---- protocol/connections/enginehooks.go | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/protocol/connections/engine.go b/protocol/connections/engine.go index e525bc6..9cd0872 100644 --- a/protocol/connections/engine.go +++ b/protocol/connections/engine.go @@ -86,10 +86,6 @@ type Engine interface { Shutdown() } -type EngineHooks interface { - SendPeerMessage(connection tapir.Connection, message []byte) error -} - // NewProtocolEngine initializes a new engine that runs Cwtch using the given parameters func NewProtocolEngine(identity primitives.Identity, privateKey ed25519.PrivateKey, acn connectivity.ACN, eventManager event.Manager, peerAuthorizations map[string]model.Authorization, engineHooks EngineHooks) Engine { engine := new(engine) diff --git a/protocol/connections/enginehooks.go b/protocol/connections/enginehooks.go index adcb90b..a37300a 100644 --- a/protocol/connections/enginehooks.go +++ b/protocol/connections/enginehooks.go @@ -2,6 +2,10 @@ package connections import "git.openprivacy.ca/cwtch.im/tapir" +type EngineHooks interface { + SendPeerMessage(connection tapir.Connection, message []byte) error +} + type DefaultEngineHooks struct { }