swirl Guide to OmniMark 6   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
  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:       

Declaration

  define external stream function TCPConnectionHasCharacters
            value	tcp-connection	Connection
    timeout value	integer		ms            optional
  where
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

    Related Syntax
   tcp-disconnect
   tcp-sink
   tcp-get
   tcp-peer-ip
   tcp-peer-name
   tcp-source
   tcp-has-characters
   tcp-is-connected
   tcp-put
   tcp-connect
   tcp-set-buffering
   tcp-signal-source-end
 
  Other Library Functions
   tcp-accept-connection
   tcp-connect
   tcp-connection
   tcp-create-service
   tcp-destroy-service
   tcp-disconnect
   tcp-get
   tcp-has-characters
   tcp-is-connected
   tcp-is-version-compatible
   tcp-library-version
   tcp-peer-ip
   tcp-peer-name
   tcp-port
   tcp-put
   tcp-service
   tcp-set-buffering
   tcp-signal-source-end
   tcp-sink
   tcp-source
 
----  

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

OmniMark 6.5 Documentation Generated: December 23, 2002 at 6:25:42 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-2002.