[Pkg] The Trunk: Network-dtl.129.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Jun 20 02:18:49 UTC 2012
David T. Lewis uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-dtl.129.mcz
==================== Summary ====================
Name: Network-dtl.129
Author: dtl
Time: 19 June 2012, 10:18:16.162 pm
UUID: c7ba60cc-b3bf-4afb-98b2-9917d145f97a
Ancestors: Network-dtl.128
Merge Network-mtf.115 from the inbox:
Name: Network-mtf.115
Author: mtf
Time: 15 May 2011, 9:49:51.176 pm
UUID: 31a375ff-af51-cd48-836d-57292a91d1ec
Ancestors: Network-ul.114
made multicast sending when the network is disconnected not result in an infinite loop. I don't know if this is correct or not,. To reproduce:
- Unplug your network
- Do a dummy multicast send:
Socket newUDP sendData: 'XXX' toHost: #[239 99 99 99] port: 9999
- Result before patch: infinite loop
- Result after patch: NetworkError
Issue originally discovered in OpenCobalt's UPnP service
=============== Diff against Network-dtl.128 ===============
Item was changed:
----- Method: Socket>>sendUDPData:toHost:port: (in category 'datagrams') -----
sendUDPData: aStringOrByteArray toHost: hostAddress port: portNumber
"Send a UDP packet containing the given data to the specified host/port."
| bytesToSend bytesSent count |
bytesToSend := aStringOrByteArray size.
bytesSent := 0.
[bytesSent < bytesToSend] whileTrue: [
(self waitForSendDoneFor: 20)
ifFalse: [ConnectionTimedOut signal: 'send data timeout; data not sent'].
count := self primSocket: socketHandle
sendUDPData: aStringOrByteArray
toHost: hostAddress asByteArray
port: portNumber
startIndex: bytesSent + 1
count: bytesToSend - bytesSent.
+ count isZero ifTrue: [NetworkError signal: 'failed to send data']..
bytesSent := bytesSent + count].
^ bytesSent
!
More information about the Packages
mailing list