Constructor
new ZreMsg(cmd, optionsopt)
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cmd |
number | ZreMsg command as number | ||||||||||||||||||||||||||||||||||||||||||||||
options |
object |
<optional> |
Options object
Properties
|
- Source:
Methods
(static) read(buffer, frame) → {ZreMsg}
Reads, validates and creates a new ZreMsg from the given Buffer and frame.
Parameters:
Name | Type | Description |
---|---|---|
buffer |
Buffer | Binary Buffer in ZreMsg format |
frame |
Buffer | Message content as binary Buffer |
- Source:
Returns:
- Type
- ZreMsg
send(socket) → {Promise}
Sends this ZreMsg with the given zeromq dealer socket.
Parameters:
Name | Type | Description |
---|---|---|
socket |
zeromq.Socket | Zeromq dealer socket |
- Source:
Returns:
- Type
- Promise
toBuffer() → {Buffer}
Creates a binary Buffer from this ZreMsg.
- Source:
Returns:
Binary Buffer in ZreMsg format
- Type
- Buffer