Module: bitmessage/messages

Namespaces

addr
error
getdata
inv
version

Methods

(static) getCommand(buf) → (nullable) {string}

Try to get command of the given encoded message. Note that this function doesn't do any validation because it is already provided by message.decode routine. Normally you call this for each incoming message and then call decode function of the appropriate message handler.

Parameters:
Name Type Description
buf Buffer

Buffer that starts with encoded message

Source:
Returns:

Message's command if any.

Type
string