net-receive and wait-string

Started by Jeff, October 06, 2009, 12:05:37 PM

Previous topic - Next topic

Jeff

Does net-receive block while waiting on wait-string if:



1) it is not found before int-max-bytes are read

2) it is not found in the bytes immediately available from the remote socket



If it does block for situation 2, is there any way to evade that behavior while still using the built-in buffer?
Jeff

=====

Old programmers don\'t die. They just parse on...



http://artfulcode.net\">Artful code

Lutz

#1
When a wait string is specified, it will retry reading the socket until either the wait-string is received or the size specified is read or the sender has no more characters available.



In any case if net-receive could not get the wait-string, it will close the connection, return 'nil' and 'net-error' is set to "Connection closed". You would have to implement any other logic yourself.

Jeff

#2
Thanks!
Jeff

=====

Old programmers don\'t die. They just parse on...



http://artfulcode.net\">Artful code