The Trunk: Network-ul.183.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Network-ul.183.mcz

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

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

Name: Network-ul.183
Author: ul
Time: 27 August 2016, 7:06:50.616798 pm
UUID: 12bf0b6e-cf75-400f-ad5f-03aaa9b6db57
Ancestors: Network-ul.182

Don't let #next:putAll:startingAt: roll back the receiver when the first argument is negative.

=============== Diff against Network-ul.182 ===============

Item was changed:
  ----- Method: SocketStream>>next:putAll:startingAt: (in category 'stream out') -----
  next: n putAll: aCollection startingAt: startIndex
  "Put a String or a ByteArray onto the stream.
  Currently a large collection will allocate a large buffer.
  Warning: this does not work with WideString: they have to be converted first."
 
+ n > 0 ifFalse: [ ^aCollection ].
  self adjustOutBuffer: n.
  outBuffer replaceFrom: outNextToWrite to: outNextToWrite + n - 1 with: aCollection startingAt: startIndex.
  outNextToWrite := outNextToWrite + n.
  self checkFlush.
  ^aCollection!