I have been using "accept datagram" to receive UDP datagrams in my 
UDP experiments.  I thought I'd try receiving UDP datagrams on a 
socket opened with "open datagram".

The Transcript Dictionary entry for "read from socket" mentions TCP 
but does not mention UDP.  I thought most likely it does not apply 
to UDP, but I thought I'd give it a try to find out.  It also 
wasn't clear what the semantics of "read from socket" would be in 
the context of UDP, so I hoped to explore that, too.

I was not able to figure out how to get or set the local port for a 
socket opened with "open datagram" or get the remote port for a 
datagram received for a socket opened with "accept datagram".  This 
made it hard to do this test.

I had hoped to communicate with a UDP data-time service.

So far, I haven't been able to get this to work. Perhaps "read from 
socket" is not intended for UDP.


I did run into a couple problems.

On OS X (Revolution 1.1.1 B1), execution of this script code causes 
Revolution to immediately and "unexpectedly" quit:

open datagram ...
read from socket ... with message ...

On W2K (Revolution 1.1) this causes all subsequent "write to 
socket" for that socket to do nothing.

I think the first is a bug.  The latter is a bug if "read from 
socket" is intended to work with UDP.  Maybe it is a bug anyway.


(In some cases the compiler complained about no until or for--but I 
don't remember which or the exact wording--when the "with message" 
clause was not used.  From the dictionary entry I thought those 
were optional.  I didn't explore this.  Since this is at compile 
time, this has nothing to do with TCP vs UDP.)


Dar Scott



_______________________________________________
improve-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/improve-revolution

Reply via email to