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
Forum Updated to NodeBB v4.3 + New Features

QLocalSocket separate multiple messages

Scheduled Pinned Locked Moved Unsolved General and Desktop
qlocalsocket
2 Posts 2 Posters 317 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 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?

    JonBJ 1 Reply Last reply
    0
    • M Mefil

      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?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on 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

      • Login

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