forked from cwtch.im/cwtch
EngineHooks into enginehooks.go
This commit is contained in:
parent
93c9813d96
commit
746bfffb7c
|
@ -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)
|
||||
|
|
|
@ -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 {
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue