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. QLocalSocket separate multiple messages
QtWS25 Last Chance

QLocalSocket separate multiple messages

Scheduled Pinned Locked Moved Unsolved General and Desktop
qlocalsocket
2 Posts 2 Posters 281 Views
  • 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.
  • M Offline
    M Offline
    Mefil
    wrote on 13 Jun 2022, 14:00 last edited by
    #1

    Hi. I use QLocalSocket in windows. Named pipes in WIndows can send separate messages except raw byte array. Is QLocalSocket have something like this? Or maybe is Qt have classes for pack/unpack separate msg with different size to byte array?

    J 1 Reply Last reply 13 Jun 2022, 14:29
    0
    • M Mefil
      13 Jun 2022, 14:00

      Hi. I use QLocalSocket in windows. Named pipes in WIndows can send separate messages except raw byte array. Is QLocalSocket have something like this? Or maybe is Qt have classes for pack/unpack separate msg with different size to byte array?

      J Offline
      J Offline
      JonB
      wrote on 13 Jun 2022, 14:29 last edited by
      #2

      @Mefil
      Hello and welcome.

      I don't really know what you have in mind. But QLocalSocket behaves just like a socket. It is not message-oriented, it is just a stream of bytes.

      You can impose whatever of your own protocol on top if you wish, e.g. precede a "message" you want to send with a byte count. If both ends are using Qt you can use QDataStream to "pack/unpack" structured data.

      1 Reply Last reply
      1

      1/2

      13 Jun 2022, 14:00

      • Login

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