|
TCPConnectionGetSource Full Description |
|
Syntax define external source function TCPConnectionGetSource
value TCPConnection this-TCPConnection
timeout value counter timeout-in-milliseconds optional
protocol value IOProtocol this-IOProtocol optional
as TCPConnectionGetSource
Purpose This function returns an external source object from which data will be read. If the passed TCP connection object is closed or was never connected, then this function returns a dummy external source object that immediately returns "end of input". At the same time, it sets the TCP connection object to be in error. The timeout value applies primarily to data read from the returned external source.
If a TCP connection from which an external source is derived is closed using Arguments:
Example:
local TCPConnection TCP-Conn local stream s set TCP-Conn to TCPConnectionOpen on "localhost" at 5300 TCPConnectionSetBuffering TCP-Conn enabled false open s with binary-mode as TCPConnectionGetOutput TCP-Conn protocol IOProtocolMultiPacket put s "hello world" close s output TCPConnectionGetSource TCP-Conn protocol IOProtocolMultiPacket |