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. A basic question about Qt unix domain socket
Forum Updated to NodeBB v4.3 + New Features

A basic question about Qt unix domain socket

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 777 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.
  • Q Offline
    Q Offline
    QTLeearn
    wrote on last edited by
    #1

    Hi, I followed the example in Qt creator to try unix domain socket and I have the 2 following questions:

    1. If the app crashed but the socket is still alive, how can I find the 'file' to delete it in order to terminate the socket?
    2. I modified the sample codes to let the server side read from the client right after the connection established, but it failed, do you have such sample codes to do that?
      Thank you in advance
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Either pass a full path when you create the server and the socket and thus, you will be able to check the concerned file or use the fullServerName method.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      Q 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi and welcome to devnet,

        Either pass a full path when you create the server and the socket and thus, you will be able to check the concerned file or use the fullServerName method.

        Q Offline
        Q Offline
        QTLeearn
        wrote on last edited by
        #3

        @SGaist said in A basic question about Qt unix domain socket:

        concerned file

        Thank you, may I ask what is the default path of the cornered file?
        thx

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          It's platform dependent. IIRC, it should be in the user temporary folder on macOS.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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