Chris Muller uploaded a new version of Network to project The Trunk: http://source.squeak.org/trunk/Network-cmm.116.mcz
==================== Summary ====================
Name: Network-cmm.116 Author: cmm Time: 21 June 2011, 3:55:44.34 pm UUID: d73f5641-b64c-47cd-b353-211ed31428a0 Ancestors: Network-ul.115, Network-cmm.100
Merged Network-cmm.100.
=============== Diff against Network-ul.115 ===============
Item was changed: ----- Method: SocketStream>>flush (in category 'control') ----- flush "If the other end is connected and we have something to send, then we send it and reset the outBuffer." + (outNextToWrite > 1 and: [ socket isOtherEndClosed not ]) ifTrue: + [ [ self + sendData: outBuffer + count: outNextToWrite - 1 ] + on: ConnectionTimedOut + do: [ : ex | shouldSignal ifTrue: [ ex pass ] ]. + outNextToWrite := 1 ]! - - ((outNextToWrite > 1) and: [socket isOtherEndClosed not]) - ifTrue: [ - [self sendData: outBuffer count: outNextToWrite - 1] - on: ConnectionTimedOut - do: [:ex | shouldSignal ifFalse: ["swallow"]]. - outNextToWrite := 1]!
Item was changed: ----- Method: SocketStream>>nextPutAllFlush: (in category 'stream out') ----- + nextPutAllFlush: aCollection - nextPutAllFlush: aCollection "Put a String or a ByteArray onto the stream. You can use this if you have very large data - it avoids copying into the buffer (and avoids buffer growing) and also flushes any other pending data first." - | toPut | + toPut := binary + ifTrue: [ aCollection asByteArray ] + ifFalse: [ aCollection asString ]. + self flush. + "first flush pending stuff, then directly send" + socket isOtherEndClosed ifFalse: + [ [ self + sendData: toPut + count: toPut size ] - toPut := binary ifTrue: [aCollection asByteArray] ifFalse: [aCollection asString]. - self flush. "first flush pending stuff, then directly send" - socket isOtherEndClosed ifFalse: [ - [self sendData: toPut count: toPut size] on: ConnectionTimedOut + do: [ : ex | shouldSignal ifTrue: [ ex pass ] ] ]! - do: [:ex | shouldSignal ifFalse: ["swallow"]]]!
packages@lists.squeakfoundation.org