Is this socket code correct?
Juan Cires Martinez
jcm at mat.upm.es
Thu Nov 18 18:00:27 UTC 1999
I modified the code to read:
[socket dataAvailable] whileFalse:
[(socket waitForDataUntil: Socket standardDeadline) ifFalse:
[self error: 'Timeout reading reply']].
buffer _ ByteArray new: 10000.
read _ socket receiveDataInto: buffer.
read < 4
ifTrue: [self error: 'Too few data read'].
and I still get the 'Too few data read' error with read = 0.
Any ideas?
PS: I'm using 2.6 on linux
More information about the Squeak-dev
mailing list
|