[Pkg] The Trunk: Network-ar.78.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Aug 5 19:24:45 UTC 2010

Andreas Raab uploaded a new version of Network to project The Trunk:

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

Name: Network-ar.78
Author: ar
Time: 5 August 2010, 12:24:17.908 pm
UUID: c0c6ce57-a1aa-a245-be4c-4f6fbd7f6a2b
Ancestors: Network-ar.77

Fixes for broken SocketStream behavior.

=============== Diff against Network-ar.77 ===============

Item was changed:
  ----- Method: SocketStream>>upToEnd (in category 'stream in') -----
  	"Answer all data coming in on the socket until the socket
  	is closed by the other end, or we get a timeout.
  	This means this method catches ConnectionClosed by itself.
  	NOTE: Does not honour timeouts if shouldSignal is false!!"
+ 	[[self isConnected] whileTrue: [self receiveData]]
- 	[[self atEnd] whileFalse: [self receiveData]]
  		on: ConnectionClosed
  		do: [:ex | "swallow it"]. 
  	^self nextAllInBuffer!

Item was changed:
  ----- Method: SocketStream>>receiveData: (in category 'control') -----
  receiveData: nBytes
  	"Keep reading the socket until we have nBytes
  	in the inBuffer or we reach the end. This method
  	does not return data, but can be used to make sure
  	data has been read into the buffer from the Socket
  	before actually reading it from the FastSocketStream.
  	Mainly used internally. We could also adjust the buffer
  	to the expected amount of data and avoiding several
  	incremental grow operations.
  	NOTE: This method doesn't honor timeouts if shouldSignal
  	is false!! And frankly, I am not sure how to handle that
  	case or if I care - I think we should always signal."
+ 	[self isConnected and: [nBytes > self inBufferSize]]
- 	[self atEnd not and: [nBytes > self inBufferSize]]
  		whileTrue: [self receiveData]!

More information about the Packages mailing list