SocketAddress.st
changeset 1232 49ce4681f1c0
parent 1229 b96b65284981
child 1259 0a557e59ea4a
equal deleted inserted replaced
1231:ad3aaa474d50 1232:49ce4681f1c0
   109                     flags:0.
   109                     flags:0.
   110 
   110 
   111     sa := addressInfo first socketAddress.
   111     sa := addressInfo first socketAddress.
   112     addressInfo size > 1 ifTrue:[
   112     addressInfo size > 1 ifTrue:[
   113         (addressInfo contains:[:entry| entry socketAddress ~= sa]) ifTrue:[
   113         (addressInfo contains:[:entry| entry socketAddress ~= sa]) ifTrue:[
   114             self error:'too many results'
   114             'SocketAddress [warning]: multiple hostAddresses for host' infoPrintCR.
   115         ].
   115         ].
   116     ].
   116     ].
   117     port notNil ifTrue:[
   117     port notNil ifTrue:[
   118         sa port:port.
   118         sa port:port.
   119     ].
   119     ].
   271 getAddressInfo:hostName serviceName:serviceName type:typeArg protocol:protoArg flags:flags 
   271 getAddressInfo:hostName serviceName:serviceName type:typeArg protocol:protoArg flags:flags 
   272     "answer an Array of socket addresses for serviceName on hostName
   272     "answer an Array of socket addresses for serviceName on hostName
   273      Domain, type, protocol may be nil or specify a hint for the socket 
   273      Domain, type, protocol may be nil or specify a hint for the socket 
   274      addresses to be returned."
   274      addresses to be returned."
   275 
   275 
   276     ^ OperatingSystem socketAccessor 
   276     ^ self  
   277             getAddressInfo:hostName serviceName:serviceName 
   277         getAddressInfo:hostName serviceName:serviceName 
   278             domain:self domainCode type:typeArg protocol:protoArg flags:flags 
   278         domain:(self domainCode) type:typeArg protocol:protoArg flags:flags 
   279 
   279 
   280     "
   280     "
   281      IPSocketAddress getAddressInfo:'localhost' serviceName:nil 
   281      IPSocketAddress getAddressInfo:'localhost' serviceName:nil 
   282                      type:nil protocol:nil flags:nil
   282                      type:nil protocol:nil flags:nil
   283      IPSocketAddress getAddressInfo:'localhost' serviceName:nil 
   283      IPSocketAddress getAddressInfo:'localhost' serviceName:nil 
   468 ! !
   468 ! !
   469 
   469 
   470 !SocketAddress class methodsFor:'documentation'!
   470 !SocketAddress class methodsFor:'documentation'!
   471 
   471 
   472 version
   472 version
   473     ^ '$Header: /cvs/stx/stx/libbasic2/SocketAddress.st,v 1.16 2003-05-21 18:27:17 cg Exp $'
   473     ^ '$Header: /cvs/stx/stx/libbasic2/SocketAddress.st,v 1.17 2003-05-21 21:22:17 cg Exp $'
   474 ! !
   474 ! !