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 6755423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:23:53+00:00 2026-05-26T13:23:53+00:00

I have a simple application on a OpenWRT style router. It’s written in C++

  • 0

I have a simple application on a OpenWRT style router. It’s written in C++ currently. The router (embedded Linux) has very limited disk space and RAM. For example there is not enough space to install Python.

So, I want to control this daemon app via the network. I have read some tutorials on creating sockets, and listening to the port for activity. But I haven’t been able to integrate the flow into a C++ class. And I haven’t been able to figure out how to decode the information received, or how to send a response.

All the tutorials I’ve read are dead ends, they show you how to make a server that basically just blocks until it receives something, and then returns a message when it got something.

Is there something a little more higher level that can be used for this sort of thing?

  • 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-05-26T13:23:54+00:00Added an answer on May 26, 2026 at 1:23 pm

    Sounds like what you are asking is “how do I build a simple network service that will accept requests from clients and do something in response?” There are a bunch of parts to this — how do you build a service framework, how do you encode and decode the requests, how do you process the requests and how do you tie it all together?

    It sounds like you’re having problems with the first and last parts. There are two basic ways of organizing a simple service like this — the thread approach and the event approach.

    In the thread approach, you create a thread for each incoming connection. That thread reads the messages (requests) from that connection (file descriptor), processes them, and writes back responses. When a connection goes away, the thread exits. You have a main ‘listening’ thread that accepts incoming connections and creates new threads to handle each one.

    In the event approach, each incoming request becomes an event. You then have event handlers that processes these events, sending back responses. Its important that the event handlers NOT block and complete promptly, otherwise the service may appear to lock up. Your program has a main event loop that waits for incoming events (generally blocking on a single poll or select call) and reads and dispatches each event as appropriate.

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

Sidebar

Related Questions

I have a simple application written in C# and .Net 2.0 that displays several
I have very simple application just in the body of Main method. I have
I currently have a simple application that needs to click on certain coordinates and
I have a simple application which has an NSSearchField and I want to know
I have a simple application that has a single page with a button that
I have a simple application written that allows users to pick inventory items with
I have written simple application with container-managed security. The problem is when I log
I have simple WinForms application where modifying Windows Registry. The problem is that in
I have a simple application with the following code: FileInfo[] files = (new DirectoryInfo(initialDirectory)).GetFiles();
I have a simple application using netbeans for developing and maven for building et

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.