Experimenting with #sendUDPData:toHost:port:

John M McIntosh johnmci at smalltalkconsulting.com
Mon Dec 11 22:20:44 UTC 2000


John M McIntosh wrote:....

>  > Socket>>sendUDPData:toHost:port:
>>
>>  is only invoked by
>>
>>  Socket>>sendData:toHost: port:
>>
>>  which is only invoked by  the UDP tests
>>
>>  Socket class>>clientServerTestUDP2
>>
>>  and the
>>  Socket class>>timeTestUDP timeTestUDP2 timeTestUDP3
>>
>>  These do work on the macintosh.
>
>Does this hold for Linux, too? I am using Ian Piumarta's 2.8 VM and in
>sqUnixSocket.c he states that UDP support probably is still missing in
>the image -- I just don't have a clue where to start looking.


>
>A problem I ran into is that when attempting to send data back to the
>sender's address (obtained via Socket>>receiveUDPDataInto:) from a
>server socket, address and port are all zeros:


I seem to recall someone saying this was a UDP support issue in the  Unix VM.

>Am I missing something?
>
>Many thanks,
><sk>


UDP support is not missing at the Smalltalk level as far as I know, 
since there are a bunch of UDP tests and no-one has complained and 
offered up an ENH change set for UDP at the Smalltalk level. However 
UDP support may be lacking in the VM you are using. There is some 
work being done on Unix socket support, see the note below that Rob 
Withers wrote about his version of sqUnixNetwork.c but note his note 
about UDP support. Check his list message and email him, perhaps he 
has a UDP version now?

At 9:57 AM -0800 11/8/00, Rob Withers wrote:
>Hi.
>
>Attached you will find a new sqUnixNetwork.c file (gzipped).  This has
>been used for at least 600 hours with one fix made to the alpha version
>I posted several weeks ago.  The fix: when you are waitingForData and
>the other end closes, then we need to signal the readSemaphore, in
>addition to the connSemaphore, to unblock the reader.  This
>implementation uses a state machine abstraction to ensure correct event
>handling at all times.  It passes most of John's tests (~95%).  It does
>not currently support UDP or SocketOptions, although that work has been
>done before and would be pretty easy to incorporate.  I actually haven't
>used it with ComSwiki and the ilk but it has been used heavily with the
>ConnectionQueue.
>
>I'm not aware of what changes Lex made in his Linux VM.  From what I
>have seen and tested, this implementation passes the most networking
>tests on the Linux platform.  It will be interesting to see how it works
>under WebServer load.
>
>regards,
>Rob
-- 
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================
Custom Macintosh programming & various Smalltalk dialects
PGP Key: DSS/Diff/46FC3BE6
Fingerprint=B22F 7D67 92B7 5D52 72D7  E94A EE69 2D21 46FC 3BE6
===========================================================================





More information about the Squeak-dev mailing list