[Openmcl-devel] Trouble writing to tcp socket
Gary Byers
gb at clozure.com
Fri Nov 14 22:38:17 PST 2014
On 11/14/2014 09:44:35 PM, Joshua Kordani wrote:
> http://paste.lisp.org/display/144373#1
>
> Even with the annotate, I can't write out to the socket. http-client
> returns nil, and in wireshark I see no packets on the wire. I am
> using a netcat listener as a test server, and the read function works
> just fine, but writing does not. I have tried this on the latest
> trunk and also on relesae 1.9, both on osx 10.7 and I get the same
> result, that is, nothing is written out on the wire as a result of
> write functions called on this stream.
>
> Am I missing something obvious or should I file a bug report?
You're missing something obvious.
FORCE-OUTPUT and FINISH-OUTPUT each take optional arguments which
specify what output stream they affect; this argument defaults to the
stream which is the value of *STANDARD-OUTPUT*, and this likely isn't
what you want. In your example, calling either
(FORCE-OUTPUT OS)
or
(FINISH-OUTPUT OS)
will cause any data in the stream's buffers to be sent to the OS.
(There was a discussion of the differences between these functions on
this list a week or two ago; I don't want to repeat that, but I think
that in most cases FORCE-OUTPUT suffices.)
Streams in CCL are almost always fully buffered.
> Thanks.
>
>--
> Joshua Kordani
> LSA Autonomy
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> https://lists.clozure.com/mailman/listinfo/openmcl-devel
>
More information about the Openmcl-devel
mailing list