[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A clear example of a server on pthreads.


Colleagues, please tell me where you can find a simple example of a server, which use a posix threads.

The examples available to me (samplesshd.c, samplesshd-tty.c, samplesshd-kbdint.c) are very straightforward and clear programs that can serve only one connection. I suppose that after ssh_bind_listen() I need to create a new thread that will serve the connection from new client, and the main thread should return to ssh_bind_listen to wait for the next one.

I have found several functions related to threads, they even provide some ready-made mutexes for correct branches. But I didn't really understand how to practically use them. Can I find a clear example somewhere? (I may have searched badly, but in my opinion the available documentation is mainly focused on examples of client's, but not servers.)

Thanks in advance for your reply,
Ogogon.

P.S. Could someone please answer my previous question?
Ogo.

Follow-Ups:
Re: A clear example of a server on pthreads.Andreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org