This package implements NASDAQ SoupBinTCP 3.00 client and server.
This class represents a SoupBinTCP client session and extends EventEmitter.
- options
Object- port
Number - host
String
- port
- callback
Function - Returns
soupbintcp.Client
Create a SoupBinTCP client session. The optional callback parameter will be executed when the session is opened.
Emitted when the session is opened.
- payload
Object- session
String - sequenceNumber
Number
- session
Emitted when a Login Accepted packet is received.
- payload
Object- rejectReasonCode
String
- rejectReasonCode
Emitted when a Login Rejected packet is received.
- payload
Buffer
Emitted when a Sequenced Data packet is received.
Emitted when an End of Session packet is received.
Emitted when this session is closed.
- err
Error
Emitted when an error occurs.
- payload
Object- username
String - password
String - requestedSession
String - requestedSequenceNumber
Number
- username
- callback
Function
Send a Login Request packet. The optional callback parameter will be executed when the packet is actually written out.
- callback
Function
Send a Logout Request packet. The optional callback parameter will be executed when the packet is actually written out.
- payload
Buffer - callback
Function
Send an Unsequenced Data packet. The optional callback parameter will be executed when the packet is actually written out.
Close this session.
This class represents a SoupBinTCP server and extends EventEmitter.
- options
Object- port
Number - host
String
- port
- callback
Function - Returns
soupbintcp.Server
Create a SoupBinTCP server. The optional callback parameter will be executed when the server has started listening for new sessions.
Emitted when the server has started listening for new sessions.
- session
soupbintcp.Session
Emitted when a new session is opened.
Emitted when this server and all sessions have closed.
- err
Error
Emitted when an error occurs.
- Returns
Object- port
Number - family
String - address
String
- port
Return the server address.
- callback
Function
Close this server, keeping existing sessions. The optional callback will be executed when all sessions have closed.
This class represents a SoupBinTCP server session and extends
EventEmitter.
- payload
Object- username
String - password
String - requestedSession
String - requestedSequenceNumber
String
- username
Emitted when a Login Request packet is received.
Emitted when a Logout Request packet is received.
- payload
Buffer
Emitted when an Unsequenced Data packet is received.
Emitted when this session is closed.
- err
Error
Emitted when an error occurs.
- payload
Object- session
String - sequenceNumber
Number
- session
- callback
Function
Send a Login Accepted packet. The optional callback parameter will be executed when the packet is actually written out.
- payload
Object- rejectReasonCode
String
- rejectReasonCode
- callback
Function
Send a Login Rejected packet. The optional callback parameter will be executed when the packet is actually written out.
- payload
Buffer - callback
Function
Send a Sequenced Data packet. The optional callback parameter will be executed when the packet is actually written out.
- callback
Function
Send an End of Session packet. The optional callback parameter will be executed when the packet is actually written out.
Close this session.