new StompServerConnection()
Class representing a connection between a STOMP client a the server. It keeps a references on the client socket,
so let write to this socket.
Methods
-
close()
-
Closes the connection with the client.
-
configureHeartbeat(ping, pong, pingHandler)
-
Configures the heartbeat.
Parameters:
Name Type Description ping
number ping time pong
number pong time pingHandler
function the ping handler -
handler() → {StompServerHandler}
-
Returns:
-
the STOMP server handler dealing with this connection
-
- Type
- StompServerHandler
-
-
onServerActivity()
-
Notifies the connection about server activity (the server has sent a frame). This method is used to handle the heartbeat.
-
ping()
-
Sends a `PING` frame to the client. A `PING` frame is a frame containing only
EOL
. -
server() → {StompServer}
-
Returns:
-
the STOMP server serving this connection.
-
- Type
- StompServer
-
-
session() → {string}
-
Returns:
-
the STOMP session id computed when the client has established the connection to the server
-
- Type
- string
-
-
write(buffer) → {StompServerConnection}
-
Writes the given buffer to the socket. This is a low level API that should be used carefully.
Parameters:
Name Type Description buffer
Buffer the buffer Returns:
the current StompServerConnection- Type
- StompServerConnection