I have a setup where a server opens a UDPSocket so that clients can use UDP
to broadcast requests for various little bits of information.
Works great except that using RB2009r2.1 the socket on the server
disconnects with an error code of 54 after sending a reply. As a work around
I've found that I can get the socket back up by calling Close and then
Connect right in the Error event. So practically, for the moment, this
problem is not interrupting the service. But I don't care for leaving it
like this. I would like to know what the error is.
Playing around I also discovered that if I place a delay in the client
method which reads the returned Datagram this problem goes away. By delay I
mean loop until 1000 microseconds go by. That's it.
This method is not being called from a thread, but the delay fix leaves me
wondering if some internal RB buffer or code just needs a chance to do some
cleanup? I didn't try DoEvents but maybe that would work as well?
While I'm at it...my understanding of UDP is that I would not use a
ServerSocket for this task like one would with a TCP service. For the server
I should just have one socket connected to a port and replying to datagrams
broadcast around the network on said port, correct?
--
Daniel L. Taylor
Taylor Design
Computer Consulting & Software Development
dtaylor@taylor-design.com
www.taylor-design.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|