[squeak-dev] The Trunk: Network-ul.177.mcz

commits at source.squeak.org commits at source.squeak.org
Sun May 15 21:35:10 UTC 2016


Levente Uzonyi uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-ul.177.mcz

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

Name: Network-ul.177
Author: ul
Time: 15 May 2016, 11:20:55.796798 pm
UUID: c12022de-43c5-4532-ac05-e2f8603fb063
Ancestors: Network-ul.176

- use #adoptInstance: to convert between binary and ascii mode instead of creating new collections

=============== Diff against Network-ul.176 ===============

Item was changed:
  ----- Method: SocketStream>>ascii (in category 'configuration') -----
  ascii
  	"Tell the SocketStream to send data
  	as Strings instead of ByteArrays.
  	This is default."
  
  	binary := false.
  	inBuffer
  		ifNil: [self resetBuffers]
+ 		ifNotNil: [
+ 			ByteString
+ 				adoptInstance: inBuffer;
+ 				adoptInstance: outBuffer ]!
- 		ifNotNil:
- 			[inBuffer := inBuffer asString.
- 			outBuffer := outBuffer asString]!

Item was changed:
  ----- Method: SocketStream>>binary (in category 'configuration') -----
  binary
  	"Tell the SocketStream to send data
  	as ByteArrays instead of Strings.
  	Default is ascii."
  
  	binary := true.
  	inBuffer
  		ifNil: [self resetBuffers]
+ 		ifNotNil: [
+ 			ByteArray
+ 				adoptInstance: inBuffer;
+ 				adoptInstance: outBuffer ]!
- 		ifNotNil:
- 			[inBuffer := inBuffer asByteArray.
- 			outBuffer := outBuffer asByteArray]!



More information about the Squeak-dev mailing list