[squeak-dev] The Trunk: Network-topa.205.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Sep 18 14:39:10 UTC 2017


Tobias Pape uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-topa.205.mcz

==================== Summary ====================

Name: Network-topa.205
Author: topa
Time: 18 September 2017, 4:38:54.251829 pm
UUID: 78da25ea-86bd-42ff-8979-5d33af450b2e
Ancestors: Network-pre.204

Make use of IPv6 in SocketStreams unless old networking is requested.

=============== Diff against Network-pre.204 ===============

Item was changed:
  ----- Method: SocketStream class>>openConnectionToHostNamed:port: (in category 'instance creation') -----
  openConnectionToHostNamed: hostName port: portNumber
+ 	
+ 	NetNameResolver useOldNetwork
+ 		ifTrue: [	| hostIP |
+ 			hostIP := NetNameResolver addressForName: hostName timeout: 20.
+ 			hostIP ifNil: [NetworkError signal: ('Cannot resolve {1}.' format: {hostName})].
+ 			^self openConnectionToHost: hostIP port: portNumber]
+ 		ifFalse: [| addressInformations lastError |
+ 			addressInformations := SocketAddressInformation
+ 				forHost: hostName
+ 				service: portNumber asString
+ 				flags: 0
+ 				addressFamily: 0
+ 				socketType: SocketAddressInformation socketTypeStream
+ 				protocol: SocketAddressInformation protocolTCP.
+ 			addressInformations do: [:addressInformation |
+ 				[^ self on: addressInformation connect] on: NetworkError do: [:e | lastError := e]].
+ 			^ lastError ifNotNil: [:e | e pass]]!
- 	| hostIP |
- 	hostIP := NetNameResolver addressForName: hostName timeout: 20.
- 	hostIP ifNil: [NetworkError signal: ('Cannot resolve {1}.' format: {hostName})].
- 	^self openConnectionToHost: hostIP port: portNumber!



More information about the Squeak-dev mailing list