Skip to content

Latest commit

 

History

History
60 lines (59 loc) · 1.03 KB

README.md

File metadata and controls

60 lines (59 loc) · 1.03 KB

topic-pub-sub

Topic Publisher and Subscriber for Network Programming project

Build and Run

All 3 programs are built with Qt Creator 4.11.0 - Qt 5.12.8

Architecture

alt text All threads with signal-slot connections are thread-safe with all threads have equal priorities.

Protocol

alt text

PUBLISHER

{
  "command": "STOP PUBLISHING",
  "topic": [topic]
}
{
  "command": "PUBLISHING",
  [data]
}
{
  "command": "START PUBLISHING",
  "topic": [topic]
}
{
  "command": "QUIT"
}

SUBSCRIBER

{
  "command": "CONNECT",
{
Server then respond with CONNECTACK
{
  "command": "STOP SUBSCRIBING",
  "topic": [topic]
}
{
  "command": "GET ALL TOPICS",
}
{
  "command": "START SUBSCRIBING",
  "topic": [topic]
}
{
  "command": "QUIT"
}

SERVER

{
  "command": "CONNECTACK",
{
Server transfer data from publisher to subscriber
{
  [data],
  "topic": [topic]
}