Deskflow 1.24.0.365
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
Handshake Messages

Connection establishment and version negotiation. More...

Collaboration diagram for Handshake Messages:

Variables

const char *const kSynergyProtocolName
 Protocol name for Synergy compatibility.
const char *const kBarrierProtocolName
 Protocol name for Barrier compatibility.
const char *const kMsgHello
 Server hello message.
const char *const kMsgHelloArgs
 Format string for server hello message arguments.
const char *const kMsgHelloBack
 Client hello response message.
const char *const kMsgHelloBackArgs
 Format string for client hello response arguments.

Detailed Description

Connection establishment and version negotiation.

Variable Documentation

◆ kBarrierProtocolName

const char* const kBarrierProtocolName
extern

Protocol name for Barrier compatibility.

Used in handshake messages to identify the protocol as Barrier-compatible. Must be exactly 7 characters for backward compatibility.

Since
Protocol version 1.0

◆ kMsgHello

const char* const kMsgHello
extern

Server hello message.

Direction: Primary → Secondary Format: "%7s%2i%2i" Parameters:

  • $1: Protocol name (7 bytes, fixed-size) - A fixed-size field for the protocol identifier, used for backward compatibility. The supported values are "Synergy" or "Barrier". "Barrier" is the default protocol name, while "Synergy" is used only for backwards compatibility. This is an exception to the standard length-prefixed string format.
  • $2: Server major version number (2 bytes)
  • $3: Server minor version number (2 bytes)

Example:

Barrier protocol, version 1.8

"Barrier\x00\x01\x00\x08"

This is the first message sent by the server after a client connects. The client uses this to determine protocol compatibility.

See also
kMsgHelloBack
Since
Protocol version 1.0

◆ kMsgHelloArgs

const char* const kMsgHelloArgs
extern

Format string for server hello message arguments.

Format: "%2i%2i" Parameters:

  • $1: Server major version number (2 bytes)
  • $2: Server minor version number (2 bytes)

Used as part of dynamic hello message construction.

See also
kMsgHello
Since
Protocol version 1.0

◆ kMsgHelloBack

const char* const kMsgHelloBack
extern

Client hello response message.

Direction: Secondary → Primary Format: "%7s%2i%2is" Parameters:

  • $1: Protocol name (7 bytes, fixed-size) - A fixed-size field for the protocol identifier, which must match the server's. The supported values are "Synergy" or "Barrier". "Barrier" is the default protocol name, while "Synergy" is used only for backwards compatibility. This is an exception to the standard length-prefixed string format.
  • $2: Client major version number (2 bytes)
  • $3: Client minor version number (2 bytes)
  • $4: Client name (string) - A standard length-prefixed string.

Example:

Barrier protocol, version 1.8, client name "workstation"

"Barrier\x00\x01\x00\x08\x00\x00\x00\x0Bworkstation"

Sent by the client in response to kMsgHello. After this exchange, both sides negotiate to use the minimum supported protocol version.

See also
kMsgHello
Since
Protocol version 1.0

◆ kMsgHelloBackArgs

const char* const kMsgHelloBackArgs
extern

Format string for client hello response arguments.

Format: "%2i%2is" Parameters:

  • $1: Client major version number (2 bytes)
  • $2: Client minor version number (2 bytes)
  • $3: Client name (string)

Used as part of dynamic hello message construction.

See also
kMsgHelloBack
Since
Protocol version 1.0

◆ kSynergyProtocolName

const char* const kSynergyProtocolName
extern

Protocol name for Synergy compatibility.

Used in handshake messages to identify the protocol as Synergy-compatible. Must be exactly 7 characters for backward compatibility.

Since
Protocol version 1.0