<html>
<head>
</head>
<body bgcolor="#FFFFFF" text="#000000">
Dear Clozure-ers,<br>
<br>
I am trying to create a simple function that queries a server and
returns the answer.<br>
I am using the socket functions integrated in Clozure to do so.<br>
Until now I succeeded in sending the request to the server with the
following code<br>
<blockquote>
<blockquote type="cite">(ccl:with-open-socket (socket
:address-family :internet :type :stream :connect :active<br>
<blockquote>:remote-host MY-HOST :remote-port MY-PORT) (format
socket MY-STRING))</blockquote>
</blockquote>
</blockquote>
But now I have no idea how to read the answer (string) that the
server gives in response to MY-STRING.<br>
The only function that I have found, receive-from, operates only
with passive sockets and I cannot find the way to convert my socket
into a passive one.<br>
There must be a simpler way that I am missing.<br>
Thanks for your help!<br>
Cheers<br>
<br>
Stefano<br>
<pre class="moz-signature" cols="72">--
M.Sc. Stefano Bennati
Centre for Cognitive Science
Friedrichstr. 50
D-79098 Freiburg, Germany
Phone: +49 761 203-4947
Fax: +49 761 203-4938
email: bennati at cognition.uni-freiburg.de
web: <a class="moz-txt-link-freetext" href="http://portal.uni.freiburg.de/cognition/members-de/bennati/">http://portal.uni.freiburg.de/cognition/members-de/bennati/</a></pre>
</body>
</html>