The network rewrite...
goran.krampe at bluefish.se
goran.krampe at bluefish.se
Fri May 9 12:38:41 UTC 2003
Hi Michael!
Hmmm, I am having problems. First of all - after the network rewrite is
installed methods need to be recompiled. Minor detail of course - I did
it in a few places (otherwise you end up in OldSocket with missing
methods) and then SqueakMap worked. Nice!
Then I tried getting my Sqcvs code running on top with your SocketStream
instead of the one in Comanche but... problems.
First of all it seems to very often go BOOM with a ConnectionTimedOut in
Socket>>sendData: - immediately. I analyzed it a bit and it is on the
first test - it hasn't even tried sending anything yet. If I added a
pause like this:
| bytesSent bytesToSend count |
bytesToSend _ aStringOrByteArray size.
bytesSent _ 0.
[bytesSent < bytesToSend] whileTrue: [
(Delay forSeconds: 1) wait.
(self waitForSendDoneUntil: (Socket deadlineSecs: 60))
ifFalse: [ConnectionTimedOut signal: 'send data timeout; data not
sent'].
count _ self primSocket: socketHandle
sendData: aStringOrByteArray
startIndex: bytesSent + 1
count: (bytesToSend - bytesSent min: 5000).
bytesSent _ bytesSent + count].
^ bytesSent
...then it works. Oooh, I love those kind of problems! And of course, it
doesn't show up if you step in the debugger.
Anyway,with the pause in place I later get funky results from
SocketStream>>upTo:. Your SocketSteam is obviously not "compatible" with
the one in Comanche. I have code that does this:
getResponse
"Get the next line from the server."
| nextLine |
nextLine _ stream upTo: Character lf.
stream next.
^nextLine
...and this seems to result in a String with 10 LFs in it. Hmmm, haven't
looked deeper here so I can't give more feedback right now.
regards, Göran
More information about the Squeak-dev
mailing list
|