eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'UDSocketAddress':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: UDSocketAddress


Inheritance:

   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

Description:


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.

copyright

COPYRIGHT (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.

Class protocol:

instance creation
o  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

o  anyHost
there is nothing like a 'host' for unix domain sockets.
answer an empty address

o  name: pathName
UDSocketAddress name:'/tmp/aUnixDomainSocket'

o  peerName: peerName port: port
use #name:

** This is an obsolete interface - do not use it (it may vanish in future versions) **

queries
o  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)

o  isLocalHostName: aString
answer true, if aString is or resolves to a local address.
Unix domain sockets are always local.

o  obsoleteDomainSymbol
old ST/X domain symbol - should no longer be used; see domain

o  peerNameFromPeer: peer

o  vwDomainSymbol
ST/X (and a few other dialects) use the define-name in the C include file
as domain symbol. VisualWorks uses another name


Instance protocol:

accessing
o  hostAddress
unix domain sockets are local and do not have a host address

o  name

o  name: pathName

o  port
compatibility with inet sockets

o  port: pathName
compatibility with inet sockets

o  portOrName

comparing
o  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
o  address

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  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) **

o  hostName: hostOrPathName port: portNrOrName

** This is an obsolete interface - do not use it (it may vanish in future versions) **

printing & storing
o  printOn: aStream
(self name:'/tmp/abcde') printString

testing
o  isLocal
answer true, if this address addresses a peer on the same host



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sun, 22 Dec 2024 04:20:33 GMT