Libreadline + get pt + multiple session over socket

H

hankypan1

Hi All,

I am developing a multi threaded CLI application which will be
running over the socket interface. So i need to have a telnet server
sort of thing, command line editor application with their multiple
session.
I could think of following approaches, pls comment

a) I write a complete telnet server which handles all keys like
backspace and all. Have my execution of specific keys at required
places.

b) Another is using libreadline over a simple telnet server which just
spawn a new process on a new pty like getting a new PT, open the
terminal and then spawn a new process which internally uses readline.
This way i dont need to go for each key handling. Now my concern is i
dont want to have seperate process for each session from socket
interface. I want to go for multi threaded application instead. Pls
let me know how i can do it.

Thanks
 
U

user923005

Hi All,

I am developing a multi threaded CLI application which will be
running over the socket interface. So i need to have a telnet server
sort of thing, command line editor application with their multiple
session.
I could think of following approaches, pls comment

a) I write a complete telnet server which handles all keys like
backspace and all. Have my execution of specific keys at required
places.

I guess that you want
b) Another is using libreadline over a simple telnet server which just
spawn a new process on a new pty like getting a new PT, open the
terminal and then spawn a new process which internally uses readline.
This way i dont need to go for each key handling. Now my concern is i
dont want to have seperate process for each session from socket
interface. I want to go for multi threaded application instead. Pls
let me know how i can do it.

It sounds like a database application to me. But then again,
everything sounds like a database application to me.

ACE has a thread multiplexer. See this stuff:
http://www.cs.wustl.edu/~schmidt/ACE.html

There are a hundred communication kits on sourceforge. Why not give
it a peek?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top