Checking if socket is still open?

M

Markus Pitha

Hello,
I want to try to program a little server.
I already managed it to send a login message to the connected user, but
I wonder how it works to get information about the connection itself?
With this information, I want to close sockets, which are not in use
anymore (because of quitting by the client).
What's the usual way of programming things like that? I mean, which
return value of which command is usually used for things like that?

I'm using C with Linux.
 
K

Keith Thompson

Markus Pitha said:
I want to try to program a little server.
I already managed it to send a login message to the connected user, but
I wonder how it works to get information about the connection itself?
With this information, I want to close sockets, which are not in use
anymore (because of quitting by the client).
What's the usual way of programming things like that? I mean, which
return value of which command is usually used for things like that?

I'm using C with Linux.

Standard C has no sockets. Try comp.unix.programmer.
 
M

Mark McIntyre

Hello,
I want to try to program a little server.
I already managed it to send a login message to the connected user, but
I wonder how it works to get information about the connection itself?

this isnt a C question, but rather a question about how to use
sockets. Try comp.unix.programmer, as this is much more ontopic there.
 

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
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top