diff options
Diffstat (limited to 'src/algebra/net.spad.pamphlet')
-rw-r--r-- | src/algebra/net.spad.pamphlet | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/algebra/net.spad.pamphlet b/src/algebra/net.spad.pamphlet index a216a5fb..f73b278c 100644 --- a/src/algebra/net.spad.pamphlet +++ b/src/algebra/net.spad.pamphlet @@ -361,6 +361,10 @@ InetClientStreamSocket(): Public == Private where if n <= 0 then close! x else setLength!(b,n : NonNegativeInteger) n + readByteIfCan! x == + r: SingleInteger := readByteFromStreamSocket(rep(x).%sock)$Lisp + if r < 0 then close! x + r writeBytes!(x,b) == n: SingleInteger := @@ -369,6 +373,11 @@ InetClientStreamSocket(): Public == Private where else setLength!(b,n : NonNegativeInteger) n + writeByteIfCan!(x,b) == + r: SingleInteger := writeByteToStreamSocket(rep(x).%sock,b)$Lisp + if r < 0 then close! x + r + close! x == closeSocket(rep(x).%sock)$Lisp rep(x).%sock := -1::SingleInteger |