David T. Lewis uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-dtl.126.mcz
==================== Summary ====================
Name: Network-dtl.126
Author: dtl
Time: 6 June 2012, 8:07:34.782 am
UUID: f6ad35b2-fac8-4cc8-8ca8-1742bd941685
Ancestors: Network-dtl.125
Set the UseOldNetwork flag at image startup if ipv6 primitives are not present in the VM.
=============== Diff against Network-dtl.125 ===============
Item was added:
+ ----- Method: NetNameResolver class>>hasIpv6PrimSupport (in category 'system startup') -----
+ hasIpv6PrimSupport
+ "True if the VM includes the ipv6 primitives"
+ ^[NetNameResolver primHostNameSize. true]
+ on: Error
+ do: [false]
+ !
Item was changed:
----- Method: NetNameResolver class>>initialize (in category 'class initialization') -----
initialize
"NetNameResolver initialize"
"Note: On the Mac, the name resolver is asynchronous (i.e., Squeak can do other things while it is working), but can only handle one request at a time. On other platforms, such as Unix, the resolver is synchronous; a call to, say, the name lookup primitive will block all Squeak processes until it returns."
"Resolver Status Values"
ResolverUninitialized := 0. "network is not initialized"
ResolverReady := 1. "resolver idle, last request succeeded"
ResolverBusy := 2. "lookup in progress"
ResolverError := 3. "resolver idle, last request failed"
DefaultHostName := ''.
+
+ UseOldNetwork := self hasIpv6PrimSupport not.
+ Smalltalk addToStartUpList: self.
+
!
Item was added:
+ ----- Method: NetNameResolver class>>startUp: (in category 'system startup') -----
+ startUp: resuming
+ "Set the UseOldNetwork flag if ipv6 primitives are not present"
+
+ resuming ifTrue: [UseOldNetwork := self hasIpv6PrimSupport not]!
David T. Lewis uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-dtl.126.mcz
==================== Summary ====================
Name: Network-dtl.126
Author: dtl
Time: 6 June 2012, 8:07:34.782 am
UUID: f6ad35b2-fac8-4cc8-8ca8-1742bd941685
Ancestors: Network-dtl.125
Set the UseOldNetwork flag at image startup if ipv6 primitives are not present in the VM.
=============== Diff against Network-dtl.125 ===============
Item was added:
+ ----- Method: NetNameResolver class>>hasIpv6PrimSupport (in category 'system startup') -----
+ hasIpv6PrimSupport
+ "True if the VM includes the ipv6 primitives"
+ ^[NetNameResolver primHostNameSize. true]
+ on: Error
+ do: [false]
+ !
Item was changed:
----- Method: NetNameResolver class>>initialize (in category 'class initialization') -----
initialize
"NetNameResolver initialize"
"Note: On the Mac, the name resolver is asynchronous (i.e., Squeak can do other things while it is working), but can only handle one request at a time. On other platforms, such as Unix, the resolver is synchronous; a call to, say, the name lookup primitive will block all Squeak processes until it returns."
"Resolver Status Values"
ResolverUninitialized := 0. "network is not initialized"
ResolverReady := 1. "resolver idle, last request succeeded"
ResolverBusy := 2. "lookup in progress"
ResolverError := 3. "resolver idle, last request failed"
DefaultHostName := ''.
+
+ UseOldNetwork := self hasIpv6PrimSupport not.
+ Smalltalk addToStartUpList: self.
+
!
Item was added:
+ ----- Method: NetNameResolver class>>startUp: (in category 'system startup') -----
+ startUp: resuming
+ "Set the UseOldNetwork flag if ipv6 primitives are not present"
+
+ resuming ifTrue: [UseOldNetwork := self hasIpv6PrimSupport not]!
David T. Lewis uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-dtl.126.mcz
==================== Summary ====================
Name: Network-dtl.126
Author: dtl
Time: 6 June 2012, 8:07:34.782 am
UUID: f6ad35b2-fac8-4cc8-8ca8-1742bd941685
Ancestors: Network-dtl.125
Set the UseOldNetwork flag at image startup if ipv6 primitives are not present in the VM.
=============== Diff against Network-dtl.125 ===============
Item was added:
+ ----- Method: NetNameResolver class>>hasIpv6PrimSupport (in category 'system startup') -----
+ hasIpv6PrimSupport
+ "True if the VM includes the ipv6 primitives"
+ ^[NetNameResolver primHostNameSize. true]
+ on: Error
+ do: [false]
+ !
Item was changed:
----- Method: NetNameResolver class>>initialize (in category 'class initialization') -----
initialize
"NetNameResolver initialize"
"Note: On the Mac, the name resolver is asynchronous (i.e., Squeak can do other things while it is working), but can only handle one request at a time. On other platforms, such as Unix, the resolver is synchronous; a call to, say, the name lookup primitive will block all Squeak processes until it returns."
"Resolver Status Values"
ResolverUninitialized := 0. "network is not initialized"
ResolverReady := 1. "resolver idle, last request succeeded"
ResolverBusy := 2. "lookup in progress"
ResolverError := 3. "resolver idle, last request failed"
DefaultHostName := ''.
+
+ UseOldNetwork := self hasIpv6PrimSupport not.
+ Smalltalk addToStartUpList: self.
+
!
Item was added:
+ ----- Method: NetNameResolver class>>startUp: (in category 'system startup') -----
+ startUp: resuming
+ "Set the UseOldNetwork flag if ipv6 primitives are not present"
+
+ resuming ifTrue: [UseOldNetwork := self hasIpv6PrimSupport not]!
David T. Lewis uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-dtl.125.mcz
==================== Summary ====================
Name: Network-dtl.125
Author: dtl
Time: 5 June 2012, 7:16:12.186 pm
UUID: f4e48ec0-15ea-4970-ad81-a6ac01e1699e
Ancestors: Network-bf.124
Move ByteArray>>asSocketAddress to Network package
=============== Diff against Network-bf.124 ===============
Item was added:
+ ----- Method: ByteArray>>asSocketAddress (in category '*Network-converting') -----
+ asSocketAddress
+ ^SocketAddress fromOldByteAddress: self!
David T. Lewis uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-dtl.125.mcz
==================== Summary ====================
Name: Network-dtl.125
Author: dtl
Time: 5 June 2012, 7:16:12.186 pm
UUID: f4e48ec0-15ea-4970-ad81-a6ac01e1699e
Ancestors: Network-bf.124
Move ByteArray>>asSocketAddress to Network package
=============== Diff against Network-bf.124 ===============
Item was added:
+ ----- Method: ByteArray>>asSocketAddress (in category '*Network-converting') -----
+ asSocketAddress
+ ^SocketAddress fromOldByteAddress: self!
David T. Lewis uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-dtl.125.mcz
==================== Summary ====================
Name: Network-dtl.125
Author: dtl
Time: 5 June 2012, 7:16:12.186 pm
UUID: f4e48ec0-15ea-4970-ad81-a6ac01e1699e
Ancestors: Network-bf.124
Move ByteArray>>asSocketAddress to Network package
=============== Diff against Network-bf.124 ===============
Item was added:
+ ----- Method: ByteArray>>asSocketAddress (in category '*Network-converting') -----
+ asSocketAddress
+ ^SocketAddress fromOldByteAddress: self!
David T. Lewis uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-bf.124.mcz
==================== Summary ====================
Name: Network-bf.124
Author: bf
Time: 5 June 2012, 3:06:54.188 pm
UUID: 74d59e26-aff4-40c0-a032-4b5bba3eed9a
Ancestors: Network-dtl.123
Do not use asSocketAddress in the old network code.
=============== Diff against Network-dtl.123 ===============
Item was changed:
----- Method: NetNameResolver class>>addressForName:timeout: (in category 'lookups') -----
addressForName: hostName timeout: secs
"Look up the given host name and return its address. Return nil if the address is not found in the given number of seconds."
"NetNameResolver addressForName: 'create.ucsb.edu' timeout: 30"
"NetNameResolver addressForName: '100000jobs.de' timeout: 30"
"NetNameResolver addressForName: '1.7.6.4' timeout: 30"
"NetNameResolver addressForName: '' timeout: 30 (This seems to return nil?)"
| deadline result |
self initializeNetwork.
self useOldNetwork
ifFalse: [^self addressForName: hostName].
"check if this is a valid numeric host address (e.g. 1.2.3.4)"
result := self addressFromString: hostName.
+ result isNil ifFalse: [^result].
- result isNil ifFalse: [^result asSocketAddress].
"Look up a host name, including ones that start with a digit (e.g. 100000jobs.de or squeak.org)"
deadline := Time millisecondClockValue + (secs * 1000).
"Protect the execution of this block, as the ResolverSemaphore is used for both parts of the transaction."
self resolverMutex
critical: [
(self waitForResolverReadyUntil: deadline)
ifTrue: [
self primStartLookupOfName: hostName.
(self waitForCompletionUntil: deadline)
ifTrue: [result := self primNameLookupResult]
ifFalse: [(NameLookupFailure hostName: hostName) signal: 'Could not resolve the server named: ', hostName]]
ifFalse: [(NameLookupFailure hostName: hostName) signal: 'Could not resolve the server named: ', hostName]].
+ ^result!
- ^result asSocketAddress!
David T. Lewis uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-bf.124.mcz
==================== Summary ====================
Name: Network-bf.124
Author: bf
Time: 5 June 2012, 3:06:54.188 pm
UUID: 74d59e26-aff4-40c0-a032-4b5bba3eed9a
Ancestors: Network-dtl.123
Do not use asSocketAddress in the old network code.
=============== Diff against Network-dtl.123 ===============
Item was changed:
----- Method: NetNameResolver class>>addressForName:timeout: (in category 'lookups') -----
addressForName: hostName timeout: secs
"Look up the given host name and return its address. Return nil if the address is not found in the given number of seconds."
"NetNameResolver addressForName: 'create.ucsb.edu' timeout: 30"
"NetNameResolver addressForName: '100000jobs.de' timeout: 30"
"NetNameResolver addressForName: '1.7.6.4' timeout: 30"
"NetNameResolver addressForName: '' timeout: 30 (This seems to return nil?)"
| deadline result |
self initializeNetwork.
self useOldNetwork
ifFalse: [^self addressForName: hostName].
"check if this is a valid numeric host address (e.g. 1.2.3.4)"
result := self addressFromString: hostName.
+ result isNil ifFalse: [^result].
- result isNil ifFalse: [^result asSocketAddress].
"Look up a host name, including ones that start with a digit (e.g. 100000jobs.de or squeak.org)"
deadline := Time millisecondClockValue + (secs * 1000).
"Protect the execution of this block, as the ResolverSemaphore is used for both parts of the transaction."
self resolverMutex
critical: [
(self waitForResolverReadyUntil: deadline)
ifTrue: [
self primStartLookupOfName: hostName.
(self waitForCompletionUntil: deadline)
ifTrue: [result := self primNameLookupResult]
ifFalse: [(NameLookupFailure hostName: hostName) signal: 'Could not resolve the server named: ', hostName]]
ifFalse: [(NameLookupFailure hostName: hostName) signal: 'Could not resolve the server named: ', hostName]].
+ ^result!
- ^result asSocketAddress!
David T. Lewis uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-bf.124.mcz
==================== Summary ====================
Name: Network-bf.124
Author: bf
Time: 5 June 2012, 3:06:54.188 pm
UUID: 74d59e26-aff4-40c0-a032-4b5bba3eed9a
Ancestors: Network-dtl.123
Do not use asSocketAddress in the old network code.
=============== Diff against Network-dtl.123 ===============
Item was changed:
----- Method: NetNameResolver class>>addressForName:timeout: (in category 'lookups') -----
addressForName: hostName timeout: secs
"Look up the given host name and return its address. Return nil if the address is not found in the given number of seconds."
"NetNameResolver addressForName: 'create.ucsb.edu' timeout: 30"
"NetNameResolver addressForName: '100000jobs.de' timeout: 30"
"NetNameResolver addressForName: '1.7.6.4' timeout: 30"
"NetNameResolver addressForName: '' timeout: 30 (This seems to return nil?)"
| deadline result |
self initializeNetwork.
self useOldNetwork
ifFalse: [^self addressForName: hostName].
"check if this is a valid numeric host address (e.g. 1.2.3.4)"
result := self addressFromString: hostName.
+ result isNil ifFalse: [^result].
- result isNil ifFalse: [^result asSocketAddress].
"Look up a host name, including ones that start with a digit (e.g. 100000jobs.de or squeak.org)"
deadline := Time millisecondClockValue + (secs * 1000).
"Protect the execution of this block, as the ResolverSemaphore is used for both parts of the transaction."
self resolverMutex
critical: [
(self waitForResolverReadyUntil: deadline)
ifTrue: [
self primStartLookupOfName: hostName.
(self waitForCompletionUntil: deadline)
ifTrue: [result := self primNameLookupResult]
ifFalse: [(NameLookupFailure hostName: hostName) signal: 'Could not resolve the server named: ', hostName]]
ifFalse: [(NameLookupFailure hostName: hostName) signal: 'Could not resolve the server named: ', hostName]].
+ ^result!
- ^result asSocketAddress!