Having trouble with sbcl networking.
2010-01-02 17:35:55 GMT
hi everybody.
First of all: I am relatively new to Lisp, so please be nice to me :D.
I am tinkering with the sbcl networking abilities but I just can't get a stream to work.
I tried to exchange messages between 2 concurrent slime processes.
That's what I tried:
Client: (defparameter *client* (make-instance 'inet-socket
:type :stream
:protocol :tcp))
Server: (defparameter *server* (make-instance 'inet-socket
:type :stream
:protocol :tcp))
Client:(socket-bind *client* #(192 168 1 42) 33333)
Server:(socket-bind *server* #(192 168 1 42) 44444)
Server:(socket-listen *server* 100)
Client:(socket-connect *client* #(192 168 1 42) 44444)
At this stage I can send data with socket-send and socket-receive. But If I try something like:
Client:(defparameter *stream1 (socket-make-stream *client* :input t :output t))
Server:(defparameter *stream1 (socket-make-stream *server* :input t :output t))
I can't wright something like:
Client:(format *stream*1 "hello, server")
Server:(read *stream2*) -> "hello, server"
I don't get any error if I try this commands but I don't get a message too.
Can anybody help me in working with streams?
thanks in advance.
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ Sbcl-help mailing list Sbcl-help <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sbcl-help


RSS Feed