Skip to main content

Session Messages

Session messages manage the lifecycle of a TCP connection to a Starbase gateway, including authentication, heartbeating, and sequence number recovery.

LogonRequest (1)

First message sent by client after establishing TCP connection.
FieldNameTypeLengthDescription
1usernamechar16Client username
2passwordchar32Client password
3resetSeqNumint810=no (do not reset sequence numbers)
1=yes (reset sequence numbers)

LogonResponse (2)

Response to LogonRequest on successful logon.
FieldNameTypeLengthDescription
1heartbeatIntervalSecondsint324Interval in seconds at which the server expects heartbeat messages from the client

LogoutRequest (4)

Request by client to gracefully terminate a connection.
FieldNameTypeLengthDescription
1reasonLengthuint81Length of reason field
2reasonchar0-255ASCII-encoded string

LoggedOut (5)

Sent in response to LogonRequest if logon failed, or in response to LogoutRequest, or unsolicited for other reasons.
FieldNameTypeLengthDescription
1reasonLengthuint81Length of reason field
2reasonchar0-255ASCII-encoded string

Heartbeat (10)

Sent by client or server periodically in the absence of other messages.
FieldNameTypeLengthDescription
1correlationIdint648Set if this Heartbeat is in response to a TestRequest; 0 if not

TestRequest (11)

Request a Heartbeat message. Can be sent by either client or server.
FieldNameTypeLengthDescription
1correlationIdint648Value the recipient should echo back in the correlationId of the Heartbeat response

ResendRequest (20)

Sent by client to request resend of a limited number of missed events. Works only when reconnecting to the same gateway host. The server will never send this message to a client.
FieldNameTypeLengthDescription
1fromSeqNumint648Sequence number of first message to be resent
2toSeqNumint648Sequence number of the last message to be resent, or 0 if all available messages after fromSeqNum should be resent

GapFill (21)

Sent by server in lieu of admin/session messages while handling a resend request.
FieldNameTypeLengthDescription
1newSeqNumint648Sequence number of next message to be sent by server