I'm creating a gamescanner using UDP to scan the games with the I/O completion port.

However, me not beeing a winsock expert, i get some problems with my application and i'm not sure if i do things the right way.

First i create a global IOCP port, After that i create some worker threads ( 2 by default ) wich creates its own socket and binds it to the global IOCP port.

Next to that, i create a array of VirtualSessions. Virtual sessions are self made objects wich fakes a TCP/IP connection, not really special just holding a OVERLAPPED structure, some buffers and a few other nonimportant stuff.
So that means for example 400 virtual sessions = 400 gameservers scanning at the same time. Now whenever a virtualsessions wants to send or recieve a packet, it post to the IOCP and sets a enum value to the specific action ( sending, recieving and so on )
PostQueuedCompletionStatus(m_hIOCP, 1, reinterpret_cast<ULONG_PTR>(this), &this->m_objOverlapped);
However, as soon as i send to manny packets to non responding servers, the IOCP keeps returning error code 10055 a.k.a. WSANOBUFS. I looked this up and it could either mean that there is no buffer space in the recieve buffer, or that there are no more locks possible. I dont have any deadlocks in the application, neither will a session be locked when sending or recieving. The buffer space cant be to small either because even with only 100 virtual sessions, this bug shows. it only takes some more time.

Does anyone know whats going on?

- Thanks already!