Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8936495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:13:31+00:00 2026-06-15T10:13:31+00:00

This is really basic but I am blanking right now. I have a daemon

  • 0

This is really basic but I am blanking right now.

I have a daemon process and would like to have multiple clients be able to talk to it. I would like a client to be able to start up and then using a shared library, essentially ‘register’ with the daemon process. The daemon process would spawn a thread off for this new client and provide a communication pipe between the client and new thread.

I am thinking a unix datagram socket as a ‘registration channel’ for all clients to use initially and then switching over to a client-specific channel but then cannot figure out how I create unique names for the new datagram sockets without setting them up a priori.

  • Server and clients are on same machine, prefer to use datagram sockets to not have to deal with breaking up the stream into packets.
  • Will be sending (very) high rate small messages back and forth.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:13:32+00:00Added an answer on June 15, 2026 at 10:13 am

    Basically I think you need to compromise and have a 2 stage process with a SOCK_STREAM socket as stage 1 and SOCK_DGRAM as stage 2.
    So it will be like this:

    server:

    1. create SOCK_STREAM socket “my.daemon.handshake”
    2. accept client
    3. send a randomly generated string XXX to the client and close the
      socket
    4. create a SOCK_DGRAM socket “my.daemon.XXX” and start
      processing it
    5. repeat (2)

    client

    1. connect to socket “my.daemon.handshake”
    2. read to EOF — get value XXX
    3. start communicating with server on socket “my.daemon.XXX”

    4. profit!!!!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This feels like a really basic question, but I haven't been able to find
This is a really basic question but... I have some code like this var
This feels like a really basic question, but I can't figure it out anyway..
I realize this question is pretty basic, but I'm really stuck. I have a
I have validated the following basic example but is it correct? Is this really
This is probably a really basic question - but I have a list of
This might seem like a really basic question but, When dividing the output of
I feel like this is really basic, but I'm having trouble with this issue.
Sorry if this is really basic but I am just learning PHP. I have
This may be a really basic SQL question, but I have seen a SQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.