[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Question regarding DatagramSocket...
From: |
Holger Hans Peter Freyther |
Subject: |
Re: [Help-smalltalk] Question regarding DatagramSocket... |
Date: |
Fri, 11 Jun 2010 23:16:27 +0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b1 Thunderbird/3.0.4 |
On 06/11/2010 08:29 PM, Paolo Bonzini wrote:
>
> Hard to say without seeing the patch. :-)
This is Work In Progress so there is no ChangeLog entry.
The change in Sockets.st is to make:
Sockets.DatagramSocket local: '0.0.0.0' port: 23000
Somehow using '23.0.0.0' will not throw an exception, and the bind fails
but no exception is thrown as well (it bound to 0.0.0.0:0). There is at
least another bug, I should create the localAddr first and then try to
derive the addressClass from that or create a local bind.
>
>> 2.) I am using the DatagramSocket>>next selector to receive the
>> datagram, I had to increase the default buffersize... but now all
>> (Datagram>>data)>>size return the size. I looked down into
>> AbstrackSocketImpl.st and the receive does not check the return value of
>> TCPrecvfrom at all. I have added a dataSize to Datagram and set the
>> return value there...
The second part is to introduce two new selectors to Datagram. One is
#dataSize the other is #dataSize, the Socket Impl. will set the return
value of the TCPrecvfrom as dataSize. This way a caller can find out how
big a datagram was, on the sending side I only want to send as much data
as I have received, so I introduced a #payloadSize which decides how
much of data to send. If dataSize is not set (or reset) it will fallback
to data size.
so how does that look?
sockets.diff
Description: Text Data
- [Help-smalltalk] Question regarding DatagramSocket..., Holger Hans Peter Freyther, 2010/06/11
- Re: [Help-smalltalk] Question regarding DatagramSocket..., Paolo Bonzini, 2010/06/11
- Re: [Help-smalltalk] Question regarding DatagramSocket...,
Holger Hans Peter Freyther <=
- [Help-smalltalk] Re: Question regarding DatagramSocket..., Paolo Bonzini, 2010/06/11
- [Help-smalltalk] Re: Question regarding DatagramSocket..., Holger Hans Peter Freyther, 2010/06/12
- Re: [Help-smalltalk] Re: Question regarding DatagramSocket..., Paolo Bonzini, 2010/06/12
- Re: [Help-smalltalk] Re: Question regarding DatagramSocket..., Holger Hans Peter Freyther, 2010/06/16
- Re: [Help-smalltalk] Re: Question regarding DatagramSocket..., Paolo Bonzini, 2010/06/16
- Re: [Help-smalltalk] Re: Question regarding DatagramSocket..., Stefan Schmiedl, 2010/06/16