The network rewrite...
Stephen Pair
stephen at pairhome.net
Fri May 9 12:48:19 UTC 2003
Perhaps SocketStream should be left out of the Network rewrite (or
renamed so that it doesn't conflict) until someone has a chance to
reconcile and test it. And anyone that makes use of SocketStream might
want to speak up with some SUnit tests.
- Stephen
goran.krampe at bluefish.se wrote:
>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
>
>
>
--
- Stephen
_________
Do you need:
Web/Domain/Application Hosting?
Mailing List Services?
IMAP/POP3/Web Email Accounts?
Instant Messaging Accounts hosted on your domain?
Email me for information.
More information about the Squeak-dev
mailing list
|