Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 20:13

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Qt C++] Packet loss

Discussion on [Qt C++] Packet loss within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2009
Posts: 36
Received Thanks: 2
[Qt C++] Packet loss

Hi, iam making BOT in Qt c++ for one small game.. Everything works fine.. iam using QTcpsocket::readyRead() and then QByteArray message = socket.readAll();.. but now i found that i miss some packets, like when i track other players positions it does not update everytime, but very often.. I found on internet that the data over sockets are send by packeges, but its size is sent before the package.. and i need wait for when the package is full recieved and then read.. I dont really know how i would do this.. (Theres no problem with the packets, like they are not half-only, but i miss some of them).. Sorry for my english, i hope someone will help me.
There is pic of how the packets looks like:
-X-Ni-ck-X- is offline  
Old 01/05/2014, 20:50   #2

 
Delinquenz's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,160
Received Thanks: 232
Quote:
I found on internet that the data over sockets are send by packeges, but its size is sent before the package..
That depends on the Byte Order.
Delinquenz is offline  
Old 01/15/2014, 16:59   #3


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 793
Size is usually sent in the packet header, which can vary in size (most of the time it will be 4 or 8). Also, I`m not sure how the QT TCP socket class works, but if it is a blocking implementation, some data might be lost. Try an other multiplexing solution, like an IOCP solution.
KraHen is offline  
Reply


Similar Threads Similar Threads
Loss Bot
07/13/2013 - Starcraft 2 - 0 Replies
gibt es noch ein lose bot um pic farmen? okay gibt wohl keine bronze liga mehr :/ in wol
20% ep and 10% honor loss
08/04/2011 - DarkOrbit - 4 Replies
Sooo As most of you saw the people moving from stage 2 to 1, what do you think will happen to 1? As I got a captcha before, and I wasn't using a bot, do you guys think I will lose 10 and 20% cuts from my ship? D: Oh and hi there :D
[Help]At a loss
03/14/2010 - EO PServer Hosting - 14 Replies
my totems are not showing up at all but everything is correct. im useing the candy db excel chart below has my cq_totem_pole_type, totempole.ini, and syntotempillar.ini
Exp Loss
10/04/2007 - Conquer Online 2 - 2 Replies
I'm curious, is it me or did I loss exp after maintenance. I thought I did after Mondays maintenance but I wasn't sure but I know for a fact I lost exp this time. I had 64.678% before maintenance, now I have 38.000% exp, and I know there's no way I got a perfect 38 before maintenance. I think I lost exp on my weapon skill also.



All times are GMT +2. The time now is 20:13.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.