Hi Santiago,<br><br>Welcome to Armed Bear Common Lisp (and Common Lisp in general)!<div><br></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>I've a socket stream named "socket" in this port and host: 50362 and localhost</div><div><br></div><div>I've written this function to redirect format function to the socket but only appears NIL. How can I redirect format t lisp function to a socket?</div>
<div><br></div><div><div><span style="white-space:pre-wrap"> </span>(defun colors()</div><div><span style="white-space:pre-wrap"> </span>(WITH-OPEN-STREAM (socket (SOCKET:SOCKET-CONNECT 50362 "localhost"))</div>
<div><span style="white-space:pre-wrap"> </span>(let ((*standard-output* socket))</div><div><span style="white-space:pre-wrap"> </span>(format t "The color is ~A" "red")</div>
<div><span style="white-space:pre-wrap"> </span>)))</div></div></blockquote><div><br></div><div>Maybe the underlying stream wants to optimize the socket writes and keeps your write buffered for now? In that case, you want to use FORCE-OUTPUT to make sure all internal buffers get written to the stream.</div>
<div><br></div><div>Hope that helps!</div><div><br></div><div>Bye,</div><div><br></div><div>Erik.</div></div></div>