// RelayMessage gets the relay message (e.g. Relay Forward, Relay Reply) into
// this option (when hopcount > 0 of outer RelayMessage).
6361
func (r *RelayMessageOption) RelayMessage() (*RelayMessage, error) {
	rm := new(RelayMessage)
	err := rm.UnmarshalBinary(*r)
	if err != nil {
		return nil, err
	}

	return rm, nil
}
999709
func (s *UpdateConnectivityInfoOutput) SetMessage(v string) *UpdateConnectivityInfoOutput {
	s.Message = &v
	return s
}
388707
func (rtm *RTM) SendMessage(msg *OutgoingMessage) {
	if msg == nil {
		rtm.Debugln("Error: Attempted to SendMessage(nil)")
		return
	}

	rtm.outgoingMessages <- *msg
}
1012372
func (s *InviteMembersInput) SetMessage(v string) *InviteMembersInput {
	s.Message = &v
	return s
}
841314
func (s *ServerEvent) SetMessage(v string) *ServerEvent {
	s.Message = &v
	return s
}
987070
func (c *Client) dispatchMessage(message redis.Message) {
	if listeners, exists := c.subscribed[message.Channel]; exists {
		for _, l := range listeners {
			l.Messages <- message
		}
	}
}
426172
func encodeRelayMessage(t messageType, addr net.UDPAddr, msg interface{}) ([]byte, error) {
	buf := bytes.NewBuffer(nil)
	handle := codec.MsgpackHandle{}
	encoder := codec.NewEncoder(buf, &handle)

	buf.WriteByte(uint8(messageRelayType))
	if err := encoder.Encode(relayHeader{DestAddr: addr}); err != nil {
		return nil, err
	}

	buf.WriteByte(uint8(t))
	err := encoder.Encode(msg)
	return buf.Bytes(), err
}
149644
func (s *ServiceEvent) SetMessage(v string) *ServiceEvent {
	s.Message = &v
	return s
}
224006
func (dht *IpfsDHT) sendMessage(ctx context.Context, p peer.ID, pmes *pb.Message) error {
	ctx, _ = tag.New(ctx, metrics.UpsertMessageType(pmes))

	ms, err := dht.messageSenderForPeer(ctx, p)
	if err != nil {
		stats.Record(ctx, metrics.SentMessageErrors.M(1))
		return err
	}

	if err := ms.SendMessage(ctx, pmes); err != nil {
		stats.Record(ctx, metrics.SentMessageErrors.M(1))
		return err
	}

	stats.Record(
		ctx,
		metrics.SentMessages.M(1),
		metrics.SentBytes.M(int64(pmes.Size())),
	)
	logger.Event(ctx, "dhtSentMessage", dht.self, p, pmes)
	return nil
}
1114792
func (s *FileSystemFailureDetails) SetMessage(v string) *FileSystemFailureDetails {
	s.Message = &v
	return s
}
92377
func (s *DescribeResizeOutput) SetMessage(v string) *DescribeResizeOutput {
	s.Message = &v
	return s
}
87654
func (s *PublishInput) SetMessage(v string) *PublishInput {
	s.Message = &v
	return s
}
1030632
func (c *Channel) SendMessage(message *Message) {
	c.lastEventID = message.id

	for c, open := range c.clients {
		if open {
			c.send <- message
		}
	}
}
1022088
func (s *AssociationStatus) SetMessage(v string) *AssociationStatus {
	s.Message = &v
	return s
}
439115
func (s *ErrorDetails) SetMessage(v string) *ErrorDetails {
	s.Message = &v
	return s
}
815794
func (s *ServiceError) SetMessage(v string) *ServiceError {
	s.Message = &v
	return s
}
586818
func (soc *Socket) RecvMessage(flags Flag) (msg []string, err error) {
	msg = make([]string, 0)
	for {
		s, e := soc.Recv(flags)
		if e == nil {
			msg = append(msg, s)
		} else {
			return msg[0:0], e
		}
		more, e := soc.GetRcvmore()
		if e == nil {
			if !more {
				break
			}
		} else {
			return msg[0:0], e
		}
	}
	return
}