[usocket-devel] allegro.lisp

Erik Huelsmann ehuels at gmail.com
Sun Mar 18 10:00:19 UTC 2007


On 3/15/07, Paul O'Rorke <paul at ororke.com> wrote:
> Hi:  I am trying to use usocket to port some projects from CLisp to ACL
> and possible SBCL and hoping usocket will enable me to have something
> general.
>
> In ACL, there seem to  be problems in the get-XXX methods that I think
> are patched as follows...

Yes, you're right, the functions have been specialized on the wrong
type. It should have been stream-usocket. You're proposing to
specialize on usocket in general, but I think that's not a good idea:
the only type of socket (currently supported) which has a peer is the
stream-socket. That also explains the difference with the local
versions of the functions: all supported sockets have local
properties.


I'm currently booted into windows, but when I get back to my
development environment, I'll commit the change to stream-usocket.

Thanks for your report!


bye,


Erik.


> ; 070315 PaulO:  this seems too specific and doesn't match get-local-address
> ; (defmethod get-peer-address ((usocket stream-server-usocket))
> (defmethod get-peer-address ((usocket usocket))
>   (hbo-to-vector-quad (socket:remote-host (socket usocket))))
>
> (defmethod get-local-port ((usocket usocket))
>   (socket:local-port (socket usocket)))
>
> ; 070315 PaulO:  this seems too specific and doesn't match get-local-name
> ; (defmethod get-peer-port((usocket stream-server-usocket))
> (defmethod get-peer-port ((usocket usocket))
>   (socket:remote-port (socket usocket)))
>
> (defmethod get-local-name ((usocket usocket))
>   (values (get-local-address usocket)
>           (get-local-port usocket)))
>
> ; 070315 PaulO:  this seems too specific and doesn't match get-local-name
> ; (defmethod get-peer-name ((usocket stream-server-usocket))
> (defmethod get-peer-name ((usocket usocket))
>   (values (get-peer-address usocket)
>           (get-peer-port usocket)))
> _______________________________________________
> usocket-devel mailing list
> usocket-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/usocket-devel
>



More information about the usocket-devel mailing list