[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Listening to TCP port?



>I've peeked in the MACTCP code for MCL, but it doesn't look on the
>face of it like it knows how to handle incoming connections.  I can't
>find any references to doing this under Allegro (but the docs here are
>scattered to the four winds, I suspect).  I've poked around inside a bit,
>but it's all rather inscrutible.

Use: (ccl::open-tcp-stream <ip-addr> <port-number>)
When <ip-addr> is NIL, MacTCP waits for an incoming connection (or times out).

>I'm looking for what under Lucid would be done with:
>
>  (multiple-value-bind (*socket* *socaddr*) (lucid::make-tcp-socket <<port>>)
>      (with-open-stream (stream (lucid::accept-tcp-stream *socket* *socaddr*))
>          .......))

   (with-open-stream (stream (ccl::open-tcp-stream NIL <<port>>))
         .......)

e