Skip to content

Commit

Permalink
rem publish
Browse files Browse the repository at this point in the history
  • Loading branch information
kelindar committed Jun 5, 2020
1 parent d86462b commit 51a1a14
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions internal/broker/service.go
Expand Up @@ -359,19 +359,6 @@ func (s *Service) Query(query string, payload []byte) (message.Awaiter, error) {
return nil, errors.New("Query manager was not setup")
}

// Publish publishes a message to everyone and returns the number of outgoing bytes written.
func (s *Service) Publish(m *message.Message, filter func(message.Subscriber) bool) (n int64) {
size := m.Size()

for _, subscriber := range s.subscriptions.Lookup(m.Ssid(), filter) {
subscriber.Send(m)
if subscriber.Type() == message.SubscriberDirect {
n += size
}
}
return
}

// Authorize attempts to authorize a channel with its key
func (s *Service) Authorize(channel *security.Channel, permission uint8) (contract.Contract, security.Key, bool) {
if channel.ChannelType == security.ChannelInvalid {
Expand Down

0 comments on commit 51a1a14

Please sign in to comment.