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

tcp-put

 
 

Library: TCP/IP client and server support (OMTCP) legacy
Include: omtcp.xin

Declaration

define external function tcp-put
         value tcp-connection Connection
    from value string         characters
 timeout value integer        ms 	    optional

Argument definitions

Connection
is a tcp-connection object representing an existing connection.
characters
are the characters that will be put in the output stream.
ms
is how long the function will wait for at least one character to be written, expressed in milliseconds.


Purpose

Use tcp-put to write characters to a TCP connection (sending them to the receiver).

Requirements

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

  include "omtcp.xin"

Connection must exist (else external exception TCP05).

There may not be an active external sink derived from Connection with tcp-sink (else external exception TCP20).

Usage Notes

If an error occurs while writing, external exception TCP12 is thrown.

If the write operation times out, external exception TCP06 is thrown.

Sequential uses of tcp-put is allowed.

Example


  local tcp-connection Connection-1
  
     set Connection-1 to tcp-connect on "localhost" at 5300
  
     tcp-put Connection-1 from "hello world"
     tcp-put Connection-1 from ((("*" ||* 78) || "%n") ||* 40)

        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 ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.