Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTcpServer & QTcpSocket passes unintended messages.
Qt 6.11 is out! See what's new in the release blog

QTcpServer & QTcpSocket passes unintended messages.

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 417 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Adames
    wrote on last edited by
    #1

    Good morning,

    I am trying to write simple server and client using QT. The main idea is to make server that passes messages to subscribed clients from other clients that sends messages to server on topic.

    My problem is that under load it passes messages to client that is not subscribed to topic. Example: Client1 is sending a lot of data to topic Example:topic1 and Example:topic2. The Client2 has subscribed to topic Example:topic1, and he is reciving messages from both "Example:topic1" and "Example:topic2". I have checked twice, my UniCom does not sends any messages to unsubscribed clients.

    Mostly the problem occurs if i run UniCom and Plugin locally.

    Any advice, what i am doing wrong?
    Using QT 5.12 on antergos.Thank you in advance for any help.

    Sources:
    https://ufile.io/a6ntg
    https://ufile.io/upmne

    Pablo J. RoginaP 1 Reply Last reply
    0
    • A Adames

      Good morning,

      I am trying to write simple server and client using QT. The main idea is to make server that passes messages to subscribed clients from other clients that sends messages to server on topic.

      My problem is that under load it passes messages to client that is not subscribed to topic. Example: Client1 is sending a lot of data to topic Example:topic1 and Example:topic2. The Client2 has subscribed to topic Example:topic1, and he is reciving messages from both "Example:topic1" and "Example:topic2". I have checked twice, my UniCom does not sends any messages to unsubscribed clients.

      Mostly the problem occurs if i run UniCom and Plugin locally.

      Any advice, what i am doing wrong?
      Using QT 5.12 on antergos.Thank you in advance for any help.

      Sources:
      https://ufile.io/a6ntg
      https://ufile.io/upmne

      Pablo J. RoginaP Offline
      Pablo J. RoginaP Offline
      Pablo J. Rogina
      wrote on last edited by
      #2

      @Adames said in QTcpServer & QTcpSocket passes unintended messages.:

      server that passes messages to subscribed clients from other clients that sends messages to server on topic.

      I'd go with Qt MQTT module and a MQTT broker (i.e. Mosquitto) before inventing the wheel again...

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved