swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
    Other Library Functions  
function  

tcp-has-characters

 
 

Library: TCP/IP client and server support (OMTCP legacy, OmniMark versions 6.0.2 - 7.0)
Include: omtcp.xin
Return type: Switch

Returns:


Declaration

define external stream function TCPConnectionHasCharacters
          value	tcp-connection	Connection
  timeout value	integer		ms            optional

Argument definitions

Connection
is an existing tcp connection.
ms
is how long the function will wait for at least one character, expressed in milliseconds.


Purpose

Use tcp-has-characters to test if there are characters available from a source on the TCP connection object.

Requirements

You must include the following line at the beginning of your OmniMark program:

  include "omtcp.xin"

Connection must exist (else external exception TCP05).

Usage Notes

None

Example


  
  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

      Other Library Functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.