Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 10:34

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

Advertisement



delete[] Frage

Discussion on delete[] Frage within the C/C++ forum part of the Coders Den category.

Reply
 
Old 03/27/2012, 12:33   #31
 
elite*gold: 5
Join Date: Sep 2006
Posts: 385
Received Thanks: 218
Mit ioctlsocket kannst du die Anzahl der Bytes im Buffer herausfinden.
Code:
unsigned long numBytes = 0;
ioctlsocket(socket, FIONREAD, &numBytes);
Nightblizard is offline  
Old 03/27/2012, 15:49   #32
 
xNopex's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 827
Received Thanks: 471
Quote:
FIONREAD returns the amount of data that can be read in a single call to the recv function, which may not be the same as the total amount of data queued on the socket.
Ich seh leider noch nicht, wie das dann das Problem löst. Vllt. steh ich aufm Schlauch.
xNopex is offline  
Old 03/27/2012, 16:51   #33
 
elite*gold: 5
Join Date: Sep 2006
Posts: 385
Received Thanks: 218
Habe ich das Problem falsch verstanden? Er will den gesamten Buffer auslesen, oder nicht?

Das heißt er muss so lange ioctlsocket aufrufen und dann numBytes auslesen bis numBytes == 0.
Nightblizard is offline  
Old 03/27/2012, 17:04   #34
 
xNopex's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 827
Received Thanks: 471
Nene passt schon, jetzt hab ichs auch begriffen. Hab nich dran gedacht, dass man die Funktion auch mehrmals aufrufen kann
xNopex is offline  
Old 03/27/2012, 19:12   #35


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
Quote:
Originally Posted by Nightblizard View Post
Nein, recv gibt die Anzahl der empfangenen Bytes zurück. Gibt es es 0 zurück, dann hat der Client die Verbindung unterbrochen.


Siehe:
War wohl noch ein bisschen bei HTTP, denn da schließt der Server die Verbindung nach der Response.
Stimmt, was hab ich da eigentlich für nen Müll gefaselt Q_Q recv ist ein Blocking Call, ergo bleibt man so lange hängen, bis Daten ankommen oder die Verbindung geschlossen wird.
MrSm!th is offline  
Reply


Similar Threads Similar Threads
HELP!!! CAN'T DELETE F-NET!!!
04/23/2011 - CrossFire - 5 Replies
Ok so this hack was detected couple day ago and I was using an injector call Black Dragon and so when I didn't open it or anything just starting crossfire normally. There is alway a pop up for f-net and sometime I got ban even though I didn't activated. So anyone know a way to help me solve this problem... (lose about 6-10 account)



All times are GMT +1. The time now is 10:34.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.