Class: StompServerConnection

vertx-stomp-js/stomp_server_connection~ StompServerConnection

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.
Source:

Methods

close()

Closes the connection with the client.
Source:

configureHeartbeat(ping, pong, pingHandler)

Configures the heartbeat.
Parameters:
Name Type Description
ping number ping time
pong number pong time
pingHandler function the ping handler
Source:

handler() → {StompServerHandler}

Source:
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.
Source:

ping()

Sends a `PING` frame to the client. A `PING` frame is a frame containing only EOL.
Source:

server() → {StompServer}

Source:
Returns:
the STOMP server serving this connection.
Type
StompServer

session() → {string}

Source:
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
Source:
Returns:
the current StompServerConnection
Type
StompServerConnection