Hudson Worden
Hudson Worden

Reputation: 2353

Command Line Interface for C++ Server

I have been working on this C++ chat server for Linux for a while and I have all the basic stuff down. I now need to make a user interface for it. I want to make a command-line interface but I'm having trouble figuring out what I should use to do so. I basically want it so there is a place at the bottom of the terminal for the admin to type and above that I want all messages, information, and etc to be displayed. What happens above the admin's input box should not affect the admin's input box. What would be the best way to accomplish this? I have tried using Ncurses but I am not sure if it is the best option.

Upvotes: 0

Views: 1239

Answers (3)

aroyer
aroyer

Reputation: 111

I think that the CLI toolkit (http://alexis.royer.free.fr/CLI/) can help for your bottom terminal, the one managing the admin interface.

You may just have to define your own IODevice so that outputs do not affect the whole screen. This IODevice may be based on ncurses for instance as you started (get inspiration from ncurses_console.h/.cpp for that).

Upvotes: 1

Offirmo
Offirmo

Reputation: 19840

You can have a look at this lib too : http://alexis.royer.free.fr/CLI/

(cli = command line interface)

Upvotes: 1

Martin Beckett
Martin Beckett

Reputation: 96109

Since you have done a chat server anyway why not just have another 'chat' connection on a different port as the admin interface? Then the interface for the admin is whatever you use as the chat client and you can admin it remotely or easily automate tt

Upvotes: 4

Related Questions