Skip to content

TCP IP connection

Andrey edited this page Dec 30, 2021 · 5 revisions

General info:

To make it possible to publish messages with Blazing Fast performance, a TCP/IP connection is introduced.

The Basic Packet Structure is:

  • u8: PacketType
  • payload: payload - according to the packet_type;

Packets:

PING=0

  • Direction: From Client to Server
  • Payload is empty

PONG=1

  • Direction: From Server to Client
  • Payload is empty

GREETING=2

  • Direction: From Client to Server

  • Payload structure:

    • Name: PascalString - of Name of the application which is making a connection. MyServiceBus Library version is inside this Feel; Ex: MyApp;1.0.0
    • ProtocolVersion: i32 - Global Version of the Client. Not Used yet. Reserved...

PACKET_VERSIONS=11

Each Packet by default has a version=1. If we are doing a breaking change of the payload - we increase the version of the packet. This packet is sent first one after the connection is established

  • Direction: From Client to Server
  • Payload structure
    • Len: u8 - the number of packets we are upgrading versions:
    • Len times sequence of
      • packetId: u8;
      • packetVersion: i32
Clone this wiki locally