Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dolphin sockets bug

1 view
Skip to first unread message

Blas Omoto

unread,
Sep 22, 2009, 6:17:06 PM9/22/09
to
Dear Andy, Blair:

I'm working with sockets and I've found a bug in
SocketReadStream>>nextLine.
The problem is that it doesn't answer the next line but all the
receiver's contents, this is because we're searching for a line
delimiter that is a string and the socket contents are a byte array,
so the search will always fail of course.

This is my bug fix for the method:

| result eol |
eol := String lineDelimiter asByteArray.
result := self upTo: eol last.
^(result notEmpty and: [result last = eol first]) ifTrue: [result
allButLast] ifFalse: [result]


Best regards,

Blas

0 new messages