Hi all,

I am trying to implement a script to relay UDP messages and have
encountered some problems with it.

1.) DatagramSocket local: '0.0.0.0' port: 23000 will end with an
exception... The document claims that local can be either a string or an
ip...and it fails here:

        addressClass := ipAddress isNil
                    ifTrue: [addressClass]
                    ifFalse: [ipAddress class].

so addressClass will be set to String, and later on "String newSocket"
leads to a messageNotUnderstood...

I have a patch to move the ipAddressOrString code to a method and call
it for the ipAddressOrString and the ipAddress variable. Would we need
this idiom in ServerSocket, StreamSocket as well? I will send a patch later.

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...

3.) Sometimes I see a nil Datagram being returned while I see genuine
traffic with tcpdump... but I will have to trace that part.



do the changes in 1st and 2nd make sense?

        z.

_______________________________________________
help-smalltalk mailing list
help-smalltalk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to