Sign in to follow this  
Followers 0
Fabry

UDP Recv is slow

2 posts in this topic

When I made a chat, I note that udprecv() slows down guigetmsg(), thus I click and then 1 second my click is polled. For resolving this problem I inserted this in my code.

$msg =guigetmsg()
; if nothing messages is received from gui or tray , receive udp data
    If $msg = 0  Then; it hurry up the program
        $data = UDPRecv($socket, 7000)
    EndIf

I hope it will be useful.


A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza è il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center]

Share this post


Link to post
Share on other sites



When I made a chat, I note that udprecv() slows down guigetmsg(), thus I click and then 1 second my click is polled. For resolving this problem I inserted this in my code.

$msg =guigetmsg()
; if nothing messages is received from gui or tray , receive udp data
    If $msg = 0  Then; it hurry up the program
        $data = UDPRecv($socket, 7000)
    EndIf

I hope it will be useful.

I don't think the problem is udprecv...

Your code after udprecv will cause 1 second waittime...

But you could also handle the udp process after the gui one.

It solves the problem too...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0