Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with sockets in Server/client

0 views
Skip to first unread message

ikatz

unread,
Oct 2, 2008, 8:56:01 AM10/2/08
to
Hi,

I have done a client and a server using sockets. In this case I have
had to use blocking sockets because if not the {gets $sock}, the fcopy
and read commands did not receive the data correctly.
In my server, once the user is authenticated he has the option of
disconnecting or to send a configuration file to the server, and then
the server has to execute a test by its own and return the results to
the user.

I have had lots of problems with the fileevents and read and fcopy
commands, but in the end using blocking sockets I have finished doing
the client and the server. The problem is that it only works for one
user, and if another user enters it has to wait until the first user
has finished.

What i want to know is if there's a way of seeing if another user is
already using the server, in order not to get blocked while the other
user is working in the server.

Thanks in advance

ikatz

unread,
Oct 2, 2008, 1:10:28 PM10/2/08
to

I have already found the solution changing the code to use non-
blocking sockets and fileevents and vwaits

0 new messages