[Pkg] The Trunk: Network-fbs.142.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jul 25 07:47:13 UTC 2013


Frank Shearar uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-fbs.142.mcz

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

Name: Network-fbs.142
Author: fbs
Time: 25 July 2013, 8:46:43.161 am
UUID: 6e2a56e3-7200-e843-976b-70b6a274d722
Ancestors: Network-fbs.141

SmalltalkImage current -> Smalltalk.

=============== Diff against Network-fbs.141 ===============

Item was changed:
  ----- Method: InternetConfiguration class>>shutDown (in category 'system startup') -----
  shutDown
+ 	(Smalltalk platformName =  'Mac OS') ifTrue: [
- 	(SmalltalkImage current platformName =  'Mac OS') ifTrue: [
  	  		HTTPSocket stopUsingProxyServer]
  	
  !

Item was changed:
  ----- Method: InternetConfiguration class>>startUp (in category 'system startup') -----
  startUp
+ 	(Smalltalk platformName =  'Mac OS') ifTrue: [
- 	(SmalltalkImage current platformName =  'Mac OS') ifTrue: [
  		self useHTTPProxy ifTrue: [
  			 (self getHTTPProxyHost findTokens: ':') ifNotEmpty: [:p |
  			 	HTTPSocket useProxyServerNamed: p first port: p second asInteger]]]!

Item was changed:
  ----- Method: NetNameResolver class>>testIPv6 (in category 'tests') -----
  testIPv6
  	"NetNameResolver testIPv6"
  	| infos addr sock size host serverSocket listeningSocket clientSocket |
  	World findATranscript: World currentEvent.
  	Transcript clear.
+ 	"Transcript show: Smalltalk listLoadedModules; cr."
- 	"Transcript show: SmalltalkImage current listLoadedModules; cr."
  	self initializeNetwork.
  	Transcript show: '---- host name ----'; cr.
  	size := NetNameResolver primHostNameSize.
  	host := String new: size.
  	NetNameResolver primHostNameResult: host.
  	Transcript show: host; cr.
  	Transcript show: '---- address information ----'; cr.
  	Transcript show: (infos := SocketAddressInformation
  						forHost: 'localhost' service: 'echo' flags: 0
  						addressFamily: 0 socketType: 0 protocol: 0) printString; cr.
  	Transcript show: '---- port manipulation ----'; cr.
  	addr := infos first socketAddress.
  	Transcript show: addr port printString; cr.
  	addr port: 1234.
  	Transcript show: addr port printString; cr.
  	Transcript show: addr printString; cr.
  	Transcript show: '---- client socket ----'; cr.
  	Transcript show: (infos := SocketAddressInformation
  						forHost: 'localhost' service: 'echo' flags: 0
  						addressFamily: 0
  						socketType: SocketAddressInformation socketTypeStream
  						protocol: SocketAddressInformation protocolTCP) printString; cr.
  	infos do: [:info |
  		Transcript show: 'Trying ', info printString, '... '.
  		(sock := info connect) notNil
  			ifTrue:
  				[sock sendData: 'hello' count: 5.
  				 Transcript show: sock receiveData printString.
  				 sock close; destroy].
  		Transcript cr].
  	Transcript show: '---- localhost defaults: loopback and wildcard addresses ----'; cr.
  	Transcript show: (SocketAddress loopbacks) printString; cr.
  	Transcript show: (SocketAddress wildcards) printString; cr.
  	Transcript show: (SocketAddress loopback4) printString; cr.
  	Transcript show: (SocketAddress wildcard4) printString; cr.
  	Transcript show: '---- impossible constraints ----'; cr.
  	Transcript show: (SocketAddressInformation
  						forHost: 'localhost' service: 'echo' flags: 0
  						addressFamily:	0
  						socketType:		SocketAddressInformation socketTypeDGram
  						protocol:		SocketAddressInformation protocolTCP) printString; cr.
  	Transcript show: '---- INET4 client-server ----'; cr.
  	Transcript show: (infos := SocketAddressInformation
  						forHost: '' service: '4242'
  						flags:			SocketAddressInformation passiveFlag
  						addressFamily:	SocketAddressInformation addressFamilyINET4
  						socketType:		SocketAddressInformation socketTypeStream
  						protocol:		SocketAddressInformation protocolTCP) printString; cr.
  	listeningSocket := infos first listenWithBacklog: 5.
  	Transcript show: (infos := SocketAddressInformation
  						forHost: 'localhost' service: '4242'
  						flags:			0
  						addressFamily:	SocketAddressInformation addressFamilyINET4
  						socketType:		SocketAddressInformation socketTypeStream
  						protocol:		SocketAddressInformation protocolTCP) printString; cr.
  	clientSocket := infos first connect.
  	serverSocket := listeningSocket accept.
  	serverSocket sendData: 'Hi there!!' count: 9.
  	Transcript show: clientSocket receiveData; cr.
  	Transcript nextPutAll: 'client side local/remote: ';
  		print: clientSocket localSocketAddress; space;
  		print: clientSocket remoteSocketAddress; cr.
  	Transcript nextPutAll: 'server side local/remote: ';
  		print: serverSocket localSocketAddress; space;
  		print: serverSocket remoteSocketAddress; cr;
  		endEntry.
  	clientSocket close; destroy.
  	serverSocket close; destroy.
  	listeningSocket close; destroy.
  	Transcript show: '---- INET6 client-server ----'; cr.
  	Transcript show: (infos := SocketAddressInformation
  						forHost: '' service: '4242'
  						flags:			SocketAddressInformation passiveFlag
  						addressFamily:	SocketAddressInformation addressFamilyINET6
  						socketType:		SocketAddressInformation socketTypeStream
  						protocol:		SocketAddressInformation protocolTCP) printString; cr.
  	infos isEmpty
  		ifTrue: [Transcript show: 'FAIL -- CANNOT CREATE INET6 SERVER'; cr]
  		ifFalse:
  			[listeningSocket := infos first listenWithBacklog: 5.
  			Transcript show: (infos := SocketAddressInformation
  								forHost: 'localhost' service: '4242'
  								flags:			0
  								addressFamily:	SocketAddressInformation addressFamilyINET6
  								socketType:		SocketAddressInformation socketTypeStream
  								protocol:		SocketAddressInformation protocolTCP) printString; cr.
  			clientSocket := infos first connect.
  			serverSocket := listeningSocket accept.
  			serverSocket sendData: 'Hi there!!' count: 9.
  			Transcript show: clientSocket receiveData; cr.
  			Transcript nextPutAll: 'client side local/remote: ';
  				print: clientSocket localSocketAddress; space;
  				print: clientSocket remoteSocketAddress; cr.
  			Transcript nextPutAll: 'server side local/remote: ';
  				print: serverSocket localSocketAddress; space;
  				print: serverSocket remoteSocketAddress; cr;
  				endEntry.
  			clientSocket close; destroy.
  			serverSocket close; destroy.
  			listeningSocket close; destroy].
  	Transcript show: '---- trivial tests done ---'; cr.!

Item was changed:
  ----- Method: PRServerDirectory>>putSmalltalkInfoInto: (in category 'private') -----
  putSmalltalkInfoInto: args 
  	"private - fills args with information from Smalltalk"
  	self flag: #todo.
  	" 
  	lastest small-land changeset / small-land version  
  	"
  	#(#datedVersion #osVersion #platformName #platformSubtype #vmPath #vmVersion #imageName #changesName #sourcesName #listBuiltinModules #listLoadedModules #getVMParameters )
  		do: [:each | 
  			| value | 
+ 			value := Smalltalk perform: each.
- 			value := SmalltalkImage current perform: each.
  			args at: 'extra-' , each asString put: {value asString isoToSqueak}]!

Item was changed:
  ----- Method: ServerDirectory class>>determineLocalServerDirectory: (in category 'server prefs') -----
  determineLocalServerDirectory: directoryName
  	"This is part of a workaround for Mac file name oddities regarding relative file names.
  	The real fix should be in fullNameFor: but that seems to break other parts of the system."
  
  	| dirName |
  	dirName := directoryName.
+ 	(Smalltalk platformName = 'Mac OS'
- 	(SmalltalkImage current platformName = 'Mac OS'
  		and: [directoryName beginsWith: ':'])
  			ifTrue: [
  				dirName := (FileDirectory default pathName endsWith: directoryName)
  					ifTrue: [FileDirectory default pathName]
  					ifFalse: [(FileDirectory default pathName , directoryName) replaceAll: '::' with: ':']].
  	^FileDirectory default directoryNamed: dirName!



More information about the Packages mailing list