Unix Programming - How To Get A Socket Client To Wait For The Server?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > January 2004 > How To Get A Socket Client To Wait For The Server?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How To Get A Socket Client To Wait For The Server?
Doug Mitton

2004-01-23, 5:27 pm

I have collected some source code from searches of Google and I have
written a very simple socket "echo client". Now, could someone point
out how I could make the client wait for the server to connect, then
connect to the server and do its echoing?

In this case the server can connect and disconnect at will and I'd
like for my client to hang around and wait for it to come back.

I can post the full source but right now it is the "connect" call
failing if the server is not available. I'd rather not poll, so I
hope there is some other "standard" available.

The server is the Kegs Apple //gs emulator that starts a server as the
emulated serial port. I'm trying to create a "client" service for
that server to emulate a modem PLUS.

Oh yes, I'm writing this in C. Thanks in advance.
--
------------------------------------------------
http://www3.sympatico.ca/dmitton
SPAM Reduction: Remove "x." from my domain.
------------------------------------------------
DINH Viet Hoa

2004-01-23, 5:27 pm

Doug Mitton wrote :
quote:

> I can post the full source but right now it is the "connect" call
> failing if the server is not available. I'd rather not poll, so I
> hope there is some other "standard" available.



it seems that the only solution for that is to poll (you can set a delay
between each retry).

--
DINH V. Hoa,

etPan! - newsreader, mail user agent -- http://libetpan.sf.net/etpan

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com