2010/1/13 Chun Tian (binghe) <binghe.lisp@gmail.com>
Hi, Elliott
ÔÚ 2010-1-14£¬10:02£¬ Elliott Slaughter дµÀ£º>The return value of SOCKET-SEND is a integer which indicated how many bytes you actually send. In theory it should equal to the LENGTH argument in SOCKET-SEND, unless you're sending too much data. Currently the return value when sending fails is not defined clearly, for some CLs "-1" will mean "sending fail", but I think I should change it to "NIL" instead in the future.
> [SOCKET-SEND]
>
> Syntax: SOCKET-SEND usocket buffer length &key host port
>
> SOCKET-SEND is used for sending packets through a UDP usocket, the "buffer" arguments usually need to be a vector of (unsigned-byte 8).
>
> What does the return value of socket-send mean?
The constant +max-datagram-packet-size+ is defined in usocket.lisp, line 14:
(defconstant +max-datagram-packet-size+ 65536)
I didn't export the symbol +MAX-DATAGRAM-PACKET-SIZE+ because it's a constant and hard limit of UDP implementation. Users don't need to change it's value, instead, there're extra keyword arguments in API functions when user want to set maximum packet sizes.