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.24 date: 2019/06/28 07:25:23
user: cg
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.


Class protocol:

instance creation
o  allForHostName: hostName serviceName: portNrOrName type: socketTypeSymbol

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

o  obsoleteDomainSymbol

o  peerNameFromPeer: peer

o  vwDomainSymbol


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

o  hostName

o  hostName: hostOrPathName port: portNrOrName

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.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 19 Apr 2024 05:41:29 GMT