Is this right?
Ned Konz
ned at bike-nomad.com
Thu Nov 28 17:09:30 UTC 2002
On Thursday 28 November 2002 07:47 am, Markus Fritsche wrote:
> It's me!
>
> Is this correct:
>
> Socktet>>primSocket:receiveDataInto:startingAt:count:
> "Receive data from the given socket into the given array starting
> at the given index. Return the number of bytes read or zero if no
> data is available."
>
> Socket>>getData
> ...
> bytesRead _ self primSocket: socketHandle receiveDataInto: buf
> startingAt: 1 count: buf size.
> ^ buf copyFrom: 1 to: (bytesRead max: 0)
>
> I'm curios when the first one returns something < 0? On error?
When the socket's not valid (at least in Unix), the primitive will
return a -1.
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|