Class SocketDriver

Summary

Package:
(main)
File:
genserve.icn
Methods:
flush, read_socket, write_socket

Fields:
Error, dtype, partition, pending_input, pending_output, socket, user

Source code.

Details
Constructor

SocketDriver(socket, user, dtype, pending_output, pending_input, partition, Error)

Parameters:
socket
user
Associated user object, or &null if none
dtype
one of "listen", "admin", or "user"
pending_output
string containing generated output not yet sent across the socket barrier.
pending_input
unhandled input (typically from incomplete lines).
partition
A string that indicates a logical break in the inputs. "\n" for example. This could be extended to be a list of strings.
Error
Indicates a socket failure if set

Methods:

flush()

 
 flushes any pending output on the socket


read_socket()

#
 returns the pending input on socket. If partition is set, the input
 is broken into parts based on partition and generated one by one.
 If Error is set then the socket is invalid and can't be trusted anymore.


write_socket(s)


Fields:
Error -- Indicates a socket failure if set

dtype -- one of "listen", "admin", or "user"

partition -- A string that indicates a logical break in the inputs. "\n" for example. This could be extended to be a list of strings.

pending_input -- unhandled input (typically from incomplete lines).

pending_output -- string containing generated output not yet sent across the socket barrier.

socket

user -- Associated user object, or &null if none


This page produced by UniDoc on 2021/04/15 @ 23:59:54.