algiuxas Posted January 29, 2017 Posted January 29, 2017 (edited) Hello everybody, I'm making an program witch reads packets from server/client, first of all it reads size of the packet(it may be 1-5 bytes in size), and then reads what's left. Problem: TCPRecv($socket,1,1) tooks really long to receive 1 byte, most of the time 100ms! You can see packets here and how much time it took to read size of them(1-5 bytes, all of them are 1 byte in size): 0xAA63 (99.8802703210873ms) 0x53 (99.8829718030123ms) 0x2B (99.7435753356861ms) 0x4E (100.176352740059ms) I want to interrupt sometimes server or client, send packets, but I cannot send packets if server/client didn't get last packet. Sometimes packets are huge(16MB or even more), sometimes they are 2-6 bytes in size. I just don't want to receive everything and just send it. I want to see every packet, and collect data from these packets. EDIT: I receive couple packets at the same time with TCPRecv to make it faster. I use TCPRecv($socket,10000,1). It made program a bit faster... But still, when receiving again these packets, it still tooks 100ms. It's still slow. How to make TCPRecv($socket,1,1) faster? I don't need any error checking or etc., just to make it as fast as possible. (I only receive everything in hexadecimal) I really need help with this... It's so slow and annoying! Edited January 30, 2017 by algiuxas After switching years ago to Linux, sadly I don't use AutoIt anymore.
ripdad Posted January 30, 2017 Posted January 30, 2017 runnable reproducer? "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward
algiuxas Posted January 30, 2017 Author Posted January 30, 2017 (edited) 1 hour ago, ripdad said: runnable reproducer? What do you mean? I'm thinking about rewriting this program to Java if I wouldn't solve this problem. AutoIt is much easier than Java... But I miss performance in AutoIt... Edited January 30, 2017 by algiuxas After switching years ago to Linux, sadly I don't use AutoIt anymore.
ripdad Posted January 30, 2017 Posted January 30, 2017 Show a runnable code that reproduces your issue. Also, state what Autoit version you are running. "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now