diff --git a/broadcast/processor.go b/broadcast/processor.go index 651974c4cb648aba5df3e56fa8f46901cc1a2899..3c35573470c15cb85caa9b4507a90d7a74d7690d 100644 --- a/broadcast/processor.go +++ b/broadcast/processor.go @@ -56,7 +56,7 @@ func (p *processor) Process(msg format.Message, jww.ERROR.Printf("Unrecognized broadcast method %d", p.method) } - go p.cb(payload, receptionID, round) + p.cb(payload, receptionID, round) } // String returns a string identifying the symmetricProcessor for debugging purposes. diff --git a/channels/interface.go b/channels/interface.go index efbf26b56c445050dca9252289a31238ca5b87bc..219857e43939df8b2a0784784115a198b36b5189 100644 --- a/channels/interface.go +++ b/channels/interface.go @@ -25,6 +25,15 @@ import ( var ValidForever = time.Duration(math.MaxInt64) type Manager interface { + + // JoinChannel joins the given channel. It will fail if the channel has + // already been joined. + JoinChannel(channel *cryptoBroadcast.Channel) error + + // LeaveChannel leaves the given channel. It will return an error if the + // channel was not previously joined. + LeaveChannel(channelID *id.ID) error + // SendGeneric is used to send a raw message over a channel. In general, it // should be wrapped in a function which defines the wire protocol // If the final message, before being sent over the wire, is too long, this will