swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax     Other Library Functions  
function  

TCPConnectionPut

 
 

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

Declaration

  define external function TCPConnectionPut
         value TCPConnection this-TCPConnection
        from value stream characters-to-be-put
      timeout value integer timeout-in-milliseconds optional
  as TCPConnectionPut


Purpose

This function writes characters to a TCP connection, sending them to the receiver.

TCPConnectionPut can be formulated in terms of TCPConnectionGetOutput as follows:

  define function TCPConnectionPut
         value TCPConnection this-TCPConnection
      from value stream characters-to-be-put
     timeout value integer timeout-in-milliseconds optional
  as
     do when timeout-in-milliseconds is specified
        set TCPConnectionGetOutput this-TCPConnection
          timeout timeout-in-milliseconds
        to characters-to-be-put
     else
        set TCPConnectionGetOutput this-TCPConnection
           to characters-to-be-put
     done

The difficulties inherent with multiple derived outputs apply to uses of TCPConnectionPut also. That is, only one external output from a connection can be derived (active) at any one time. The current external output must be closed before you can issue a TCPConnectionPut.

Note that sequential uses of TCPConnectionPut in the absence of any use of TCPConnectionGetOutput is allowed.

Any attempt to do a TCPConnectionPut when there is already active output derived from TCPConnectionGetOutput output is not allowed and will result in an OmniMark external function exception.

Any attempt to do a TCPConnectionPut when the associated TCP connection has been closed using TCPConnectionClose is in error, in the same manner as for an external output derived from the TCP connection.

Arguments:

Example:

  local TCPConnection TCP-Conn

  set TCP-Conn to TCPConnectionOpen on "localhost" at 5300

  TCPConnectionPut TCP-Conn from "hello world"
  TCPConnectionPut TCP-Conn from ((("*" ||* 78) || "%n") ||* 40)

    Related Syntax
   TCPConnectionGetOutput
 
  Other Library Functions
   TCPConnection
   TCPConnectionClose
   TCPConnectionGetCharacters
   TCPConnectionGetLine
   TCPConnectionGetOutput
   TCPConnectionGetPeerIP
   TCPConnectionGetPeerName
   TCPConnectionGetSource
   TCPConnectionGetStatusReport
   TCPConnectionHasCharactersToRead
   TCPConnectionIsConnected
   TCPConnectionIsInError
   TCPConnectionOpen
   TCPConnectionPut
   TCPConnectionSetBuffering
   TCPConnectionSignalSourceEnd
   TCPIsVersionCompatible
   TCPLibraryVersion
   TCPService
   TCPServiceAcceptConnection
   TCPServiceClose
   TCPServiceGetPort
   TCPServiceGetStatusReport
   TCPServiceIsInError
   TCPServiceIsOpen
   TCPServiceOpen
   TCPTraceConnectionOpen
 
 

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

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:51 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.