On Mon, Jul 13, 2009 at 01:11:55PM +0200, Alexander Burger wrote: > (native NIL "setsockopt" 'I Sock IPPROTO_TCP TCP_NODELAY (4) 4)
This is not correct, the (4) argument creates a 4-byte uninitialized buffer. Correct would be (native NIL "setsockopt" 'I Sock IPPROTO_TCP TCP_NODELAY (4 0 . 0) 4) to pass the int value 0, and (native NIL "setsockopt" 'I Sock IPPROTO_TCP TCP_NODELAY (4 1 . 0) 4) to pass an int value of 1. Explanation: (4) allocates a buffer of 4 bytes. (4 . 0) allocates 4 bytes and initializes them to zero (4 . 255) allocates 4 bytes and initializes them to 0xFF (4 0 0 0 0) also allocates 4 bytes and initializes them to zero (4 1 . 0) allocates 4 bytes, initializes the first to '1' and the rest to zero That is, you can supply either some explicit byte values, or a number in the CDR of the last cell which tells how to initialize the rest of the buffer. Cheers, - Alex -- UNSUBSCRIBE: mailto:[email protected]?subject=unsubscribe
