|
Class: UDSocketAddress
Object
|
+--Collection
|
+--SequenceableCollection
|
+--ArrayedCollection
|
+--UninterpretedBytes
|
+--SocketAddress
|
+--UDSocketAddress
- Package:
- stx:libbasic2
- Category:
- OS-Sockets
- Version:
- rev:
1.27
date: 2022/09/12 10:51:03
- user: stefan
- file: UDSocketAddress.st directory: libbasic2
- module: stx stc-classLibrary: libbasic2
Instances of UDSocketAddress represent unix-domain socket names.
ST-80 compatibility class.
This may be required when existing code has to be ported to ST/X;
however, it may not be complete and more protocol may be added in the future.
The code here was created when public domain code (Manchester) had to
be ported to ST/X and missing classes/methods were encountered, and code added
by reasoning 'what the original class could probably do there'.
This is an additional goody class; therefore:
THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTOR ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTOR BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
copyrightCOPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
instance creation
-
allForHostName: hostName serviceName: portNrOrName type: socketTypeSymbol
-
(comment from inherited method)
get a collection of new instances given a hostname, port or service and type.
Multi-homed hosts return more than one entry
-
anyHost
-
there is nothing like a 'host' for unix domain sockets.
answer an empty address
-
name: pathName
-
UDSocketAddress name:'/tmp/aUnixDomainSocket'
-
peerName: peerName port: port
-
use #name:
** This is an obsolete interface - do not use it (it may vanish in future versions) **
queries
-
domain
-
ST/X (and a few other dialects) use the define-name in the C include file
as domain symbol. VisualWorks uses other names (see vwDomainSymbol)
-
isLocalHostName: aString
-
answer true, if aString is or resolves to a local address.
Unix domain sockets are always local.
-
obsoleteDomainSymbol
-
old ST/X domain symbol - should no longer be used; see domain
-
peerNameFromPeer: peer
-
-
vwDomainSymbol
-
ST/X (and a few other dialects) use the define-name in the C include file
as domain symbol. VisualWorks uses another name
accessing
-
hostAddress
-
unix domain sockets are local and do not have a host address
-
name
-
-
name: pathName
-
-
port
-
compatibility with inet sockets
-
port: pathName
-
compatibility with inet sockets
-
portOrName
-
comparing
-
sameHostAddress: aSocketAddress
-
answer true, if myself and aSocketAddress have the same host address
(but possibly different ports).
UnixDomainSockets are always on the same host.
obsolete
-
address
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
hostName
-
(comment from inherited method)
(IPSocketAddress hostAddress:#[127 0 0 1]) hostName
(IPSocketAddress hostName:'localhost') address
(IPSocketAddress hostName:'www.google.com') address
(IPSocketAddress hostAddress:#[127 0 0 1] port:7) hostName
(IPSocketAddress hostAddress:#[172 23 1 1] port:10) hostName
(IPSocketAddress hostAddress:#[172 24 1 244]) hostName
(IPv6SocketAddress hostAddress: #[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1]) hostName
(IPv6SocketAddress hostAddress: #[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2]) hostName
(IPv6SocketAddress hostAddress: #[0 0 0 0 0 0 0 0 0 0 255 255 127 0 0 1]) hostName
(IPv6SocketAddress hostAddress: #[0 0 0 0 0 0 0 0 0 0 255 255 172 23 1 1]) hostName
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
hostName: hostOrPathName port: portNrOrName
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
printing & storing
-
printOn: aStream
-
(self name:'/tmp/abcde') printString
testing
-
isLocal
-
answer true, if this address addresses a peer on the same host
|