UDSocketAddress.st
author Claus Gittinger <cg@exept.de>
Thu, 06 Sep 2007 17:31:09 +0200
changeset 1894 8bf137acc445
parent 1366 e01d0f6c102a
child 1908 7d5c6c7d805f
permissions -rw-r--r--
if no unit is given in the readString, assume seconds.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
100
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
	      All Rights Reserved
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
1164
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
    13
"{ Package: 'stx:libbasic2' }"
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
    14
818
2f8331ad12d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
    15
SocketAddress variableByteSubclass:#UDSocketAddress
1164
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
    16
	instanceVariableNames:''
488
b0c17a5ff8ea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
    17
	classVariableNames:''
b0c17a5ff8ea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
    18
	poolDictionaries:''
816
489e7876ab3e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
    19
	category:'OS-Sockets'
100
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
!
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
!UDSocketAddress class methodsFor:'documentation'!
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
copyright
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
"
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
 COPYRIGHT (c) 1995 by Claus Gittinger
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
	      All Rights Reserved
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
 This software is furnished under a license and may be used
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 only in accordance with the terms of that license and with the
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 be provided or otherwise made available to, or used by, any
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 other person.  No title to or ownership of the software is
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 hereby transferred.
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
"
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
!
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
documentation
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
"
111
92392ae9a0f0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 100
diff changeset
    40
    Instances of UDSocketAddress represent unix-domain socket names.
92392ae9a0f0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 100
diff changeset
    41
100
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    ST-80 compatibility class.
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
    This may be required when existing code has to be ported to ST/X;
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    however, it may not be complete and more protocol may be added in the future.
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
    The code here was created when public domain code (Manchester) had to
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    be ported to ST/X and missing classes/methods were encountered, and code added
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
    by reasoning 'what the original class could probably do there'.
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
    This is an additional goody class; therefore:
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
    THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTOR ``AS IS'' AND
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
    ARE DISCLAIMED.  IN NO EVENT SHALL THE CONTRIBUTOR BE LIABLE
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
    SUCH DAMAGE.
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
"
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
! !
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
!UDSocketAddress class methodsFor:'instance creation'!
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
1319
4b9a0784a799 Protocol compatibility: #anyHost, #port
Stefan Vogel <sv@exept.de>
parents: 1262
diff changeset
    67
anyHost
4b9a0784a799 Protocol compatibility: #anyHost, #port
Stefan Vogel <sv@exept.de>
parents: 1262
diff changeset
    68
    "there is nothing like a 'host' for unix domain sockets.
4b9a0784a799 Protocol compatibility: #anyHost, #port
Stefan Vogel <sv@exept.de>
parents: 1262
diff changeset
    69
     answer an empty address"
4b9a0784a799 Protocol compatibility: #anyHost, #port
Stefan Vogel <sv@exept.de>
parents: 1262
diff changeset
    70
4b9a0784a799 Protocol compatibility: #anyHost, #port
Stefan Vogel <sv@exept.de>
parents: 1262
diff changeset
    71
    ^ self new
4b9a0784a799 Protocol compatibility: #anyHost, #port
Stefan Vogel <sv@exept.de>
parents: 1262
diff changeset
    72
!
4b9a0784a799 Protocol compatibility: #anyHost, #port
Stefan Vogel <sv@exept.de>
parents: 1262
diff changeset
    73
1262
d3daddd36a99 no longer callBack into sockets getHostName/getAddress code.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
    74
hostName:hostName serviceName:portNrOrName type:socketTypeSymbol
d3daddd36a99 no longer callBack into sockets getHostName/getAddress code.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
    75
    (hostName notNil and:[hostName ~= 'localhost']) ifTrue:[
d3daddd36a99 no longer callBack into sockets getHostName/getAddress code.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
    76
        self error:'Only local connections possible with UD sockets'.
d3daddd36a99 no longer callBack into sockets getHostName/getAddress code.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
    77
        ^ nil.
d3daddd36a99 no longer callBack into sockets getHostName/getAddress code.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
    78
    ].
d3daddd36a99 no longer callBack into sockets getHostName/getAddress code.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
    79
    portNrOrName isNumber ifTrue:[
d3daddd36a99 no longer callBack into sockets getHostName/getAddress code.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
    80
        self error:'UD sockets require a path argument'.
d3daddd36a99 no longer callBack into sockets getHostName/getAddress code.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
    81
        ^ nil.
d3daddd36a99 no longer callBack into sockets getHostName/getAddress code.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
    82
    ].
d3daddd36a99 no longer callBack into sockets getHostName/getAddress code.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
    83
d3daddd36a99 no longer callBack into sockets getHostName/getAddress code.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
    84
    ^ self name:portNrOrName
d3daddd36a99 no longer callBack into sockets getHostName/getAddress code.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
    85
!
d3daddd36a99 no longer callBack into sockets getHostName/getAddress code.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
    86
100
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
name: pathName
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
    ^ self new name:pathName
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
    "
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
     UDSocketAddress name:'/tmp/aUnixDomainSocket' 
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
    "
1259
0a557e59ea4a instance creation refactored
Claus Gittinger <cg@exept.de>
parents: 1228
diff changeset
    93
!
0a557e59ea4a instance creation refactored
Claus Gittinger <cg@exept.de>
parents: 1228
diff changeset
    94
0a557e59ea4a instance creation refactored
Claus Gittinger <cg@exept.de>
parents: 1228
diff changeset
    95
peerName:peerName port:port
0a557e59ea4a instance creation refactored
Claus Gittinger <cg@exept.de>
parents: 1228
diff changeset
    96
    ^ self name:peerName
100
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
! !
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
1164
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
    99
!UDSocketAddress class methodsFor:'queries'!
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   100
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   101
domainSymbol
100
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
1226
0114bd044aa9 vw compatible domainSymbols (afXXX)
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
   103
    ^ #'AF_UNIX'
0114bd044aa9 vw compatible domainSymbols (afXXX)
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
   104
!
0114bd044aa9 vw compatible domainSymbols (afXXX)
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
   105
0114bd044aa9 vw compatible domainSymbols (afXXX)
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
   106
obsoleteDomainSymbol
1164
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   107
    ^ #unix
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   108
!
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   109
1259
0a557e59ea4a instance creation refactored
Claus Gittinger <cg@exept.de>
parents: 1228
diff changeset
   110
peerNameFromPeer:peer
0a557e59ea4a instance creation refactored
Claus Gittinger <cg@exept.de>
parents: 1228
diff changeset
   111
    ^ 'localhost'
0a557e59ea4a instance creation refactored
Claus Gittinger <cg@exept.de>
parents: 1228
diff changeset
   112
!
0a557e59ea4a instance creation refactored
Claus Gittinger <cg@exept.de>
parents: 1228
diff changeset
   113
1226
0114bd044aa9 vw compatible domainSymbols (afXXX)
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
   114
vwDomainSymbol
0114bd044aa9 vw compatible domainSymbols (afXXX)
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
   115
    ^ #afUnix
100
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
! !
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
1164
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   118
!UDSocketAddress methodsFor:'accessing'!
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   119
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   120
name
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   121
    ^ self stringAt:3
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   122
!
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   123
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   124
name:pathName
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   125
    self stringAt:3 put:pathName
1319
4b9a0784a799 Protocol compatibility: #anyHost, #port
Stefan Vogel <sv@exept.de>
parents: 1262
diff changeset
   126
!
4b9a0784a799 Protocol compatibility: #anyHost, #port
Stefan Vogel <sv@exept.de>
parents: 1262
diff changeset
   127
4b9a0784a799 Protocol compatibility: #anyHost, #port
Stefan Vogel <sv@exept.de>
parents: 1262
diff changeset
   128
port
4b9a0784a799 Protocol compatibility: #anyHost, #port
Stefan Vogel <sv@exept.de>
parents: 1262
diff changeset
   129
    "ccompatibility with inet sockets"
4b9a0784a799 Protocol compatibility: #anyHost, #port
Stefan Vogel <sv@exept.de>
parents: 1262
diff changeset
   130
4b9a0784a799 Protocol compatibility: #anyHost, #port
Stefan Vogel <sv@exept.de>
parents: 1262
diff changeset
   131
    ^ self name
1164
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   132
! !
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   133
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   134
!UDSocketAddress methodsFor:'obsolete'!
100
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
488
b0c17a5ff8ea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   136
address
b0c17a5ff8ea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   137
    ^ nil
b0c17a5ff8ea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   138
!
b0c17a5ff8ea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   139
111
92392ae9a0f0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 100
diff changeset
   140
hostName
1164
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   141
    ^ 'local'
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   142
!
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   143
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   144
hostName:hostOrPathName port:portNrOrName
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   145
    self name:hostOrPathName
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   146
!
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   147
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   148
port:pathName
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   149
    self name:pathName
111
92392ae9a0f0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 100
diff changeset
   150
!
92392ae9a0f0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 100
diff changeset
   151
100
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
portOrName
1164
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   153
    ^ self name
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   154
! !
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   155
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   156
!UDSocketAddress methodsFor:'printing & storing'!
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   157
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   158
printOn:aStream
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   159
    aStream nextPutAll:self class name; 
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   160
            nextPut:$(; nextPutAll:self name; nextPut:$)
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   161
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   162
    "
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   163
     (self name:'/tmp/abcde') printString
41a2750af1fa New socket support
Stefan Vogel <sv@exept.de>
parents: 818
diff changeset
   164
    "
100
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
! !
058d9257c30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
1366
e01d0f6c102a New method #isLocal returning true for local addresses
Stefan Vogel <sv@exept.de>
parents: 1319
diff changeset
   167
!UDSocketAddress methodsFor:'testing'!
e01d0f6c102a New method #isLocal returning true for local addresses
Stefan Vogel <sv@exept.de>
parents: 1319
diff changeset
   168
e01d0f6c102a New method #isLocal returning true for local addresses
Stefan Vogel <sv@exept.de>
parents: 1319
diff changeset
   169
isLocal
e01d0f6c102a New method #isLocal returning true for local addresses
Stefan Vogel <sv@exept.de>
parents: 1319
diff changeset
   170
    "answer true, if this address adresses a peer on the same host"
e01d0f6c102a New method #isLocal returning true for local addresses
Stefan Vogel <sv@exept.de>
parents: 1319
diff changeset
   171
e01d0f6c102a New method #isLocal returning true for local addresses
Stefan Vogel <sv@exept.de>
parents: 1319
diff changeset
   172
    ^ true
e01d0f6c102a New method #isLocal returning true for local addresses
Stefan Vogel <sv@exept.de>
parents: 1319
diff changeset
   173
! !
e01d0f6c102a New method #isLocal returning true for local addresses
Stefan Vogel <sv@exept.de>
parents: 1319
diff changeset
   174
488
b0c17a5ff8ea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   175
!UDSocketAddress class methodsFor:'documentation'!
b0c17a5ff8ea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   176
b0c17a5ff8ea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   177
version
1366
e01d0f6c102a New method #isLocal returning true for local addresses
Stefan Vogel <sv@exept.de>
parents: 1319
diff changeset
   178
    ^ '$Header: /cvs/stx/stx/libbasic2/UDSocketAddress.st,v 1.14 2003-11-28 11:17:25 stefan Exp $'
488
b0c17a5ff8ea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   179
! !