From a3dccc344e57259f113b7f2d7e2761ad8131e60b Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 25 Oct 2008 03:21:55 +0000 Subject: * interp/sys-os.boot: Import oa_socket_read_byte as readByteFromStreamSocket. Import oa_socket_write_byte as writeByteToStreamSocket. * include/sockio.h (oa_socket_read_byte): Declare. (oa_socket_write_byte): Likewise. * lib/sockio-c.c (oa_socket_read_byte): Define. (oa_socket_write_byte): Likewise. * algebra/net.spad.pamphlet (readByteIfCan!$InetClientStreamSocket): Implement. (writeByteIfCan!$InetClientStreamSocket): Likewise. * etc/asq.c.pamphlet: Update build rules for asq$(EXEEXT). --- src/interp/sys-os.boot | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/interp') diff --git a/src/interp/sys-os.boot b/src/interp/sys-os.boot index bfa70eba..58e42706 100644 --- a/src/interp/sys-os.boot +++ b/src/interp/sys-os.boot @@ -126,12 +126,26 @@ import oa__get__host__address: (string, int, writeonly buffer byte) -> int import oa__connect__ip__port__stream: (readonly buffer byte,int,int) -> int for connectToHostAndPort +++ Try to read bytes of data from socket. +++ Return -1 for failure; number of read bytes, otherwise. import oa__socket__read: (int,writeonly buffer byte,int) -> int for readFromStreamSocket + +++ Try to read a byte socket from a socket. +++ Return -1 on failure; byte read, otherwise. +import oa__socket__read__byte: int -> int + for readByteFromStreamSocket +++ Try to write bytes of data to socket. +++ Return -1 on failure; actual bytes written, otherwise. import oa__socket__write: (int,readonly buffer byte,int) -> int for writeToStreamSocket +++ Try to write a byte to socket. +++ Return -1 on failure; the written byte, otherwise. +import oa__socket__write__byte: (int,int) -> int + for writeByteToStreamSocket + import oa__close__socket: int -> int for closeSocket --% OpenAxiom subsystem socket support -- cgit v1.2.3