| 
||||||||||
| 
 | 
||||||||||
| Related Syntax | Other Library Functions | |||||||||
| function | tcp-has-characters | 
  Available in:
   Professional Enterprise  | 
| 
Library: omtcp - TCP/IP client and server support
 Include: omtcp.xin  | 
Return type: Switch Returns:  | 
  define external stream function TCPConnectionHasCharacters
            value	tcp-connection	Connection
    timeout value	integer		ms            optional
where
Use tcp-has-characters to test if there are characters available from a source on the TCP connection object.
You must include the following line at the beginning of your OmniMark program: 
include "omtcp.xin"
Connection must exist (else external exception TCP05).
None
  local tcp-connection Connection-1
     set Connection-1 to tcp-connect on "localhost" at 5300
     repeat
        exit unless tcp-has-characters Connection-1 timeout 2000
        output tcp-get Connection-1
     again
| ---- |