// delMessage only calls local dbadapter delete.
486333
func (adapter *Adapter) delMessage(formatter *render.Render) http.HandlerFunc {
	return func(w http.ResponseWriter, req *http.Request) {
		localtxn := local.NewBytesTxn(adapter.base.PropagateChanges)
		localtxn.Delete(req.RequestURI)
		err := localtxn.Commit(context.Background())

		if err != nil {
			formatter.JSON(w, http.StatusInternalServerError, struct{ Test string }{err.Error()})
		} else {
			formatter.JSON(w, http.StatusOK, struct{ Test string }{"OK"})
		}
	}
}
1201049
func (c *SocketConnection) ReadMessage() (*Message, error) {
	Debug("Waiting for connection message to be received ...")

	select {
	case err := <-c.err:
		return nil, err
	case msg := <-c.m:
		return msg, nil
	}
}
519513
func handleDataMessage(src string, timestamp uint64, dm *textsecure.DataMessage) error {
	flags, err := handleFlags(src, dm)
	if err != nil {
		return err
	}

	atts, err := handleAttachments(dm)
	if err != nil {
		return err
	}

	gr, err := handleGroups(src, dm)
	if err != nil {
		return err
	}

	msg := &Message{
		source:      src,
		message:     dm.GetBody(),
		attachments: atts,
		group:       gr,
		timestamp:   timestamp,
		flags:       flags,
	}

	if client.MessageHandler != nil {
		client.MessageHandler(msg)
	}
	return nil
}
364714
func (s *Session) ChannelMessage(channelID, messageID string) (st *Message, err error) {

	response, err := s.RequestWithBucketID("GET", EndpointChannelMessage(channelID, messageID), nil, EndpointChannelMessage(channelID, ""))
	if err != nil {
		return
	}

	err = unmarshal(response, &st)
	return
}
1095692
func (s *DeleteParameterGroupOutput) SetDeletionMessage(v string) *DeleteParameterGroupOutput {
	s.DeletionMessage = &v
	return s
}
1140339
func (v *Bonk) GetMessage() (o string) {
	if v != nil && v.Message != nil {
		return *v.Message
	}

	return
}
569489
func (c *ServerContext) DecryptMessage(msg []byte, seqno uint32) (uint32, []byte, error) {
	return decryptMessage(c.sctxt, msg, seqno)
}
761312
func (s *Server) LastMessage() string {
	if len(s.Messages()) == 0 {
		return ""
	}

	return s.Messages()[len(s.Messages())-1]
}
673446
func (rtm *Client) SendMessage(m *Message) error {
	rtm.socketLock.RLock()
	defer rtm.socketLock.RUnlock()

	if rtm.socketConnection == nil {
		return exception.New("Connection is closed.")
	}

	return rtm.socketConnection.WriteJSON(m)
}
878223
func (l Listener) OnTextMessage(e *gumble.TextMessageEvent) {
	if l.TextMessage != nil {
		l.TextMessage(e)
	}
}
1179167
func DiscardMessage(msg *Message, pluginID string, comment string) {
	GetStreamMetric(msg.GetStreamID()).Discarded.Inc(1)
	MessageTrace(msg, pluginID, comment)
}
247256
func (mr *MockAgentMockRecorder) HandleMessage(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleMessage", reflect.TypeOf((*MockAgent)(nil).HandleMessage), arg0, arg1, arg2, arg3, arg4)
}
476512
func (s *MessageStore) DeleteMessage(msg lnwire.Message,
	peerPubKey [33]byte) error {

	// Construct the key for which we'll find this message with in the
	// store.
	msgKey, err := messageStoreKey(msg, peerPubKey)
	if err != nil {
		return err
	}

	return s.db.Batch(func(tx *bbolt.Tx) error {
		messageStore := tx.Bucket(messageStoreBucket)
		if messageStore == nil {
			return ErrCorruptedMessageStore
		}

		// In the event that we're attempting to delete a ChannelUpdate
		// from the store, we'll make sure that we're actually deleting
		// the correct one as it can be overwritten.
		if msg, ok := msg.(*lnwire.ChannelUpdate); ok {
			// Deleting a value from a bucket that doesn't exist
			// acts as a NOP, so we'll return if a message doesn't
			// exist under this key.
			v := messageStore.Get(msgKey)
			if v == nil {
				return nil
			}

			dbMsg, err := lnwire.ReadMessage(bytes.NewReader(v), 0)
			if err != nil {
				return err
			}

			// If the timestamps don't match, then the update stored
			// should be the latest one, so we'll avoid deleting it.
			if msg.Timestamp != dbMsg.(*lnwire.ChannelUpdate).Timestamp {
				return nil
			}
		}

		return messageStore.Delete(msgKey)
	})
}
47750
func (c *Conn) WriteMessage(messageType int, data []byte) error {

	if c.isServer && (c.newCompressionWriter == nil || !c.enableWriteCompression) {
		// Fast path with no allocations and single frame.

		var mw messageWriter
		if err := c.beginMessage(&mw, messageType); err != nil {
			return err
		}
		n := copy(c.writeBuf[mw.pos:], data)
		mw.pos += n
		data = data[n:]
		return mw.flushFrame(true, data)
	}

	w, err := c.NextWriter(messageType)
	if err != nil {
		return err
	}
	if _, err = w.Write(data); err != nil {
		return err
	}
	return w.Close()
}
907221
func FindMessage(d *pb.DescriptorProto, name string) int {
	for i, x := range d.GetNestedType() {
		if x.GetName() == name {
			return i
		}
	}
	return -1
}
314206
func (c *Connection) putInMessage(x *buffer.InMessage) {
	c.mu.Lock()
	c.inMessages.Put(unsafe.Pointer(x))
	c.mu.Unlock()
}
764873
func (s *DBInstanceStatusInfo) SetMessage(v string) *DBInstanceStatusInfo {
	s.Message = &v
	return s
}