Class: Socket

jmp~Socket(socketType, schemeopt, keyopt)

ZMQ socket that parses the Jupyter Messaging Protocol

Constructor

new Socket(socketType, schemeopt, keyopt)

Parameters:
Name Type Attributes Default Description
socketType String | Number ZMQ socket type
scheme String <optional>
"sha256" Hashing scheme
key String <optional>
"" Hashing key
Source:

Methods

addListener(event, listener) → {module:jmp~Socket}

Add listener to the end of the listeners array for the specified event
Parameters:
Name Type Description
event String
listener function
Source:
Returns:
`this` to allow chaining
Type
module:jmp~Socket

on(event, listener) → {module:jmp~Socket}

Add listener to the end of the listeners array for the specified event
Parameters:
Name Type Description
event String
listener function
Source:
Returns:
`this` to allow chaining
Type
module:jmp~Socket

once(event, listener) → {module:jmp~Socket}

Add a one-time listener to the end of the listeners array for the specified event
Parameters:
Name Type Description
event String
listener function
Source:
Returns:
`this` to allow chaining
Type
module:jmp~Socket

removeAllListeners(eventopt) → {module:jmp~Socket}

Remove all listeners, or those for the specified event
Parameters:
Name Type Attributes Description
event String <optional>
Source:
Returns:
`this` to allow chaining
Type
module:jmp~Socket

removeListener(event, listener) → {module:jmp~Socket}

Remove listener from the listeners array for the specified event
Parameters:
Name Type Description
event String
listener function
Source:
Returns:
`this` to allow chaining
Type
module:jmp~Socket

send(message, flags) → {module:jmp~Socket}

Send the given message.
Parameters:
Name Type Description
message module:jmp~Message | String | Buffer | Array
flags Number
Source:
Returns:
`this` to allow chaining
Type
module:jmp~Socket