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

TCPConnectionGetPeerIP

 
 

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

The peer's IP address.


Declaration

  define external stream function TCPConnectionGetPeerIP
        value TCPConnection this-TCPConnection
  as TCPConnectionGetPeerIP


Purpose

This function is used to determine the IP address of the peer host on the other side of the connection. The IP is returned in dotted decimal format (for example, "127.0.0.1").

If the passed TCP connection object is closed or was never connected, this function returns a distinct value that doesn't look like a valid peer IP, and causes the TCP connection to be in error.

Argument:

Example:

  local TCPService omdemo-service
  local TCPConnection client

  set omdemo-service to TCPServiceOpen at 5600

  repeat
     set client to TCPServiceAcceptConnection omdemo-service
     output "Request from " || "g"% TCPConnectionGetPeerIP client || "%n"
     ;process request
  again

    Related Syntax
   TCPConnectionGetPeerName
 
  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.