chickadee » socket » socket-send-all

socket-send-all so buf #!optional (start 0) (end #f) (flags 0)procedure

Sends all data between start and end in buf over connected socket so by calling socket-send multiple times until all data is sent.

Data is sent in chunks of size (socket-send-size); the last chunk sent may be smaller than this. A #f value for socket-send-size will attempt to send all remaining data with each call to send(). Note that this chunking works for connected datagram sockets as well as stream sockets; you can use it to send a large buffer divided into, say, 512-byte datagrams.