Sockets - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Connectivity : Web Features : Network Communication : Sockets Package : Sockets/HostInfo

Sockets

  

HostInfo

  

retrieve platform specific host information

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

HostInfo( key::symbol )::anything

Parameters

key

-

recognized symbol identifying the requested information

Description

• 

It is often necessary to retrieve platform specific data about the host on which your Sockets package code is running. The procedure HostInfo provides a simple interface through which you can request this kind of information.

• 

A single symbol called the key is a required argument. The key is a mnemonic identifier for the specific information requested. An unrecognized key, or a call with a recognized key for which the information requested is not available results in an appropriate error message.

• 

The recognized keys vary according to platform, but the following keys are recognized on all platforms: platform, os, hostname, domainname, and pid.

• 

Platform specific keys generally exist only for testing purposes, are subject to change, and are not documented. For example, the key glibc is recognized only on Linux platforms (and reflects the compile-time glibc library version number.

Examples

withSockets:

HostInfo'platform'

unix

(1)

HostInfo'os'

Linux

(2)

HostInfo'pid'

31870

(3)

HostInfo'domainname'

(none)

(4)

If an unrecognized key is used, Maple returns an error.

HostInfo'NoSuchKey'

Error, (in Sockets:-HostInfo) HostInfo request not recognised

If a key is not relevant in a platform, for example, domainname in a single user Windows version, Maple returns an error.

HostInfo'domainname'

Error, (in Sockets:-HostInfo) unable to determine host information

See Also

Sockets

Sockets,GetHostName

Sockets,GetProcessID

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam