next up previous
: pmat : Macro Operators : plugin-ox


[(sm1.socket) key [args] ] extension result-object
 key  :  open, connect, accept, select, mselect, read, write, readByte, writeByte, close.
Note that read and write are used for only string data.
See also Kan/debug/server.sm1
 (open) [portNumber hostname]  ---> [fd0 portNumber] 
 (accept) [fd0]                ---> fd              
 (connect) [portNumber hostname] -> [fd portNumber] 
 (select) [fd time]            ---> 1 (ready) or 0  
     if (time < 0) then it waits until data comes.  
 (mselect) [[fd0 fd1 ... ] time] -> [s0 s1 s2 ... ] 
 (read) [fd]                   ---> string-obj      
 (write) [fd string-obj]       ---> n-of-bytes-written 
 (readByte) [fd]               ---> data(byte)      
 (writeByte) [fd data(byte)]   ---> n-of-bytes-written 
 (writeByte) [fd array_of_data]---> n-of-bytes-written 
 (close) [fd]                  ---> status

Nobuki Takayama 平成22年2月8日