Programmer's Reference

Instance methods

getHostByAddr: aString
Answers the representation of the hostEnt structure for the specified address.

aString:
A host address32 bit in network order.

The getHostByAddr: operation returns an instance of SciHostEnt which is a representation of the hostEnt structure for the specified address retrieved from the platform.

The getHostByAddr: operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, EINTR, ENODATA, EHOSTNOTFOUND. For detailed information on these errors, see Error values.

getHostByName: hostName
Answers the representation of the hostent structure for the specified host.

hostName
A host name.

The getHostByName: operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, EINTR, ENODATA, EHOSTNOTFOUND. For detailed information on these errors, see Error values.

getHostName
Answers the standard host name (hostEnt) for the local machine.

The getHostName operation returns a String retrieved from the platform that contains the standard host name for the local machine.

The getHostName operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, EFAULT. For detailed information on these errors, see Error values.

getProtoByName: aProtoName
Answers the protocol information corresponding to the protocol name

aProtoName
A protocol name.

The getProtoByName: operation returns an instance of SciProtoEnt which represents the protoent structure returned by the platform. This structure contains the official name of the protocol, the alternate names of the protocol and the protocol number.

The getProtoByName: operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, EINTR, ENODATA. For detailed information on these errors, see Error values.

getProtoByNumber: aProtoNumber
Answers the protocol information corresponding to the protocol number.

aProtoNumber
A protocol number

The getProtoByNumber: operation returns an instance of SciProtoEnt which represents the protoent structure returned by the platform. This structure contains the official name of the protocol, the alternate names of the protocol and the protocol number.

The getProtoByNumber: operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, EINTR, ENODATA. For detailed information on these errors, see Error values.

getServByName: serviceName protocol: protocolName
Answers the service information corresponding to the service name and protocol.

serviceName
A service name.

protocolName
A protocol name or nil.

The getServByName: operation returns an instance of SciServEnt which represents the servent structure returned by the platform. This structure contains the official name of the service, the alternate names of the service, the port number at which the service is located and the name of the protocol to use with the service.

If the protocol parameter is nil the first service found is returned.

The getServByName: operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, EINTR, ENODATA. For detailed information on these errors, see Error values.

getServByPort: port protocol: protocolName
Answers the service information (SciServEnt) corresponding to the service port number and protocol.

port
A port number.

protocolName
A protocol name or nil.

The getServByPort: operation returns an instance of SciServEnt which represents the servent structure returned by the platform. This structure contains the official name of the service, the alternate names of the service, the port number at which the service is located and the name of the protocol to use with the service.

The getServByPort: operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, EINTR, ENODATA. For detailed information on these errors, see Error values.

selectRead: readCollection write: writeCollection except: exceptionCollection timeout: timeout
Answers a SciResult that contain socket collections (orderedCollections) that are ready for attention.

The select operation examines the sockets in the readCollection, writeCollection, and exceptionCollection to see if any of these sockets are ready for reading, ready for writing, or have an exception condition pending respectively.

readCollection
A collection of sockets to check for read ready.

writeCollection
A collection of sockets to check for write ready.

exceptionCollection
A collection of sockets to check for exceptions.

timeout
The timeout interval, 0 for non-blocking, nil for pure blocking.

The parameter timeout specifies a maximum interval in microseconds to wait for the select operation to complete.

The readCollection, writeCollection, and exceptionCollection can be any ordered collection. This method answers a SciResult, which can be queried for the resulting ordered collections with the selectors readCollection, writeCollection, and exceptionCollection.

The operation will block for up to the timeout (Integer) period or until one of the sockets in at least one of the sets becomes ready or has an exception pending. If timeout is set to 0 the operation returns immediately. If timeout is set to nil, the operation blocks until at least one of the descriptors meets the specified criteria. The select operation blocks the current Smalltalk process.

Selecting read ready on a socket upon which a listen call has been performed will indicate that a subsequent accept call on that socket will not block.

The selectRead: operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, EBADF, ENOTSOCK, EINTR, EINVAL, EINPROGRESS. For detailed information on these errors, see Error values.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]