PDA

Click to See Complete Forum and Search --> : [RESOLVED] Runtime error 10055 - No buffer space is available


edhanz
Jul 21st, 2009, 12:07 AM
Hi,

i want to know what if i sent a packet through winsock array (10000) to server, so i made an app with winsock control and made it as 10000 array. each packet i sent through all sockets only 32 bytes and the server will reply with 32 bytes as well..

i don't write any code in dataarrival so the packet from the server won't be processed. but my app crash before all sockets receive the packets from server:

"Runtime error 10055 - No buffer space is available"

if i made it to 3000 array, then it works fine..

what caused this? does this have something to do with my hardware?
my RAM is 1,5 GB

vbpHacker
Jul 21st, 2009, 06:48 AM
I don't think it's running out of RAM, I think it might be how the Winsock control internally buffers data...but can't say for sure.

You could try using the Winsock API functions (asyncrhonous ones) instead and see what happens.

Why are you doing this anyway?

edhanz
Jul 21st, 2009, 03:29 PM
it was just suddenly crossed my mind when i read someone's post about thousand connections at one time in this forum. i wondered, how many maximum connections winsock control can handle, so i tried it and got that problem as a result..

so far i only knew using winsock control. i don't have any idea how to use Winsock API functions (asyncrhonous ones). honestly, i don't need thousand connections for my app indeed, but i think maybe someday i would use it..

so, can anyone explain what caused that error? if winsock control couldn't handle thousand connections, then how some server (such as a busy chat server) handle thousands connecton successfuly?

and i just search internet, that kind of error not only occured on winsock control..

thank you..

edhanz
Jul 23rd, 2009, 09:56 PM
i've found the way. i just have to add 100 ms delay for each connection and no more error..