// Sends a message containing a number of parts.
423514
func (s *Socket) Send(parts [][]byte) (err error) {
	for _, part := range parts[:len(parts)-1] {
		if err = s.SendPart(part, true); err != nil {
			return
		}
	}
	return s.SendPart(parts[len(parts)-1], false)
}
1318338
func (r *Response) Send(msg string) {
	r.bot.Client.Send(r, msg)
}
432514
func (c *Channel) Send(message string, recursive bool) {
	textMessage := TextMessage{
		Message: message,
	}
	if recursive {
		textMessage.Trees = []*Channel{c}
	} else {
		textMessage.Channels = []*Channel{c}
	}
	c.client.Send(&textMessage)
}
1322381
func (s *Server) sendMessage(peer Peer, msg wtwire.Message) error {
	// TODO(conner): use buffer pool?

	var b bytes.Buffer
	_, err := wtwire.WriteMessage(&b, msg, 0)
	if err != nil {
		err = fmt.Errorf("unable to encode msg: %v", err)
		return err
	}

	err = peer.SetWriteDeadline(time.Now().Add(s.cfg.WriteTimeout))
	if err != nil {
		err = fmt.Errorf("unable to set write deadline: %v", err)
		return err
	}

	logMessage(peer, msg, false)

	_, err = peer.Write(b.Bytes())
	return err
}
920758
func (s *ServerStream) SendMessage(ctx context.Context, msg *StreamMessage) error {
	return s.stream.SendMessage(ctx, msg)
}
355418
func (c *Client) Message(level string, msg string) {
	c.MessageWithExtras(level, msg, noExtras)
}
459203
func send(c chan result, v interface{}, e Error) {
	c <- result{v, e}
}
451624
func (p *Player) SendMessage(message string) {
	pkt := &packet.ChatMessage{message}
	pkt.WriteTo(p.Conn)
}
296212
func (conn *Conn) Part(channel string, message ...string) {
	msg := strings.Join(message, " ")
	if msg != "" {
		msg = " :" + msg
	}
	conn.Raw(PART + " " + channel + msg)
}
950993
func (c *Transport) Send(ctx context.Context, messageParts ...[]byte) (<-chan Message, error) {
	conn, err := c.getConnection(ctx)
	if err != nil {
		return nil, driver.WithStack(err)
	}
	result, err := conn.Send(ctx, messageParts...)
	if err != nil {
		return nil, driver.WithStack(err)
	}
	return result, nil
}
1042790
func (s *sender) sendSegment(data buffer.VectorisedView, flags byte, seq seqnum.Value) *tcpip.Error {
	s.lastSendTime = time.Now()
	if seq == s.rttMeasureSeqNum {
		s.rttMeasureTime = s.lastSendTime
	}

	rcvNxt, rcvWnd := s.ep.rcv.getSendParams()

	// Remember the max sent ack.
	s.maxSentAck = rcvNxt

	return s.ep.sendRaw(data, flags, seq, rcvNxt, rcvWnd)
}
337887
func (d *pcXTDriver) send(codes []string) {
	d.buffer = append(d.buffer, codes)
}
1232952
func MessageWithExtras(level string, msg string, extras map[string]interface{}) {
	std.MessageWithExtras(level, msg, extras)
}
206598
func SendMessage(command, family, flags int) error {
	return SendMessageCallback(command, family, flags, callbackDefault, nil)
}
1263690
func (bot TgBot) SendMessage(cid int, text string, parsemode *ParseModeT, dwp *bool, rtmid *int, rm *ReplyMarkupInt) ResultWithMessage {
	var pm *string = nil
	if parsemode != nil {
		pmt := parsemode.String()
		pm = &pmt
	}
	payload := QuerySendMessage{cid, text, pm, dwp, rtmid, rm}
	return bot.SendMessageQuery(payload)
}
136533
func (c *Client) Send(ctx context.Context, msg interface{}) error {
	return c.asynchronous.Send(ctx, msg)
}
1088731
func (ref *AsyncProducer) SendMsgToPartition(topic string, partition int32, key Encoder, msg Encoder, metadata interface{}) {
	if msg == nil {
		return
	}

	message := &sarama.ProducerMessage{
		Topic:     topic,
		Partition: partition,
		Key:       key,
		Value:     msg,
		Metadata:  metadata,
	}

	ref.Producer.Input() <- message

	ref.Debugf("message sent: %s", message)

	return
}