d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > C++ Command Listener
Add Reply New Topic New Poll
Member
Posts: 1,358
Joined: Dec 30 2012
Gold: 0.10
Jun 9 2014 11:06pm
I'm trying to implement a command listener in my program, but I'm not sure what the best approach to this is.

What I have so far is just a basic loop in a dedicated thread that'll intercept commands.

My idea is to make the thread listen on a port and execute commands that way somehow...

Anyone know of an efficient and practical way to do this?

This post was edited by SelfTaught on Jun 9 2014 11:06pm
Member
Posts: 1,241
Joined: Jun 25 2011
Gold: Locked
Jun 10 2014 05:06am
I think what you mean is "command or argument parser" not listener, if that's it you can use google there is quite a few libraries around
Member
Posts: 1,358
Joined: Dec 30 2012
Gold: 0.10
Jun 10 2014 10:50am
Quote (m0hawk @ Jun 10 2014 03:06am)
I think what you mean is "command or argument parser" not listener, if that's it you can use google there is quite a few libraries around

I want to pass commands to the program while it's running not just during initial execution.
Member
Posts: 1,241
Joined: Jun 25 2011
Gold: Locked
Jun 10 2014 10:59am
Quote (SelfTaught @ Jun 10 2014 06:50pm)
I want to pass commands to the program while it's running not just during initial execution.


Doesnt matter if its at execution or runtime, the library will help you parse the string containing your commands and options
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll