Close
Close window
HostInfo - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

Sockets

HostInfo

retrieve platform specific host information

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:

>

HostInfoplatform

unix

(1)
>

HostInfoos

Linux

(2)
>

HostInfopid

269034

(3)
>

HostInfodomainname

(none)

(4)

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

>

HostInfoNoSuchKey

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

>

HostInfodomainname


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /