Advertisement

Overlapping I/O sockets

Started by December 09, 2003 05:13 PM
0 comments, last by Leadorn 21 years, 2 months ago
Hi Im tying to send data using overlapping I/O sockets, but it fails on WSARecv. Ive looked up the errorcode and, WSAEFAULT - errorcode The lpBuffers parameter is not totally contained in a valid part of the user address space.

WSAOVERLAPPED wsaoverlapped;
memset(&wsaoverlapped,0,sizeof(wsaoverlapped));
wsabuffer.len = sizeof(buffer);
wsabuffer.buf = buffer;
			
m_errorcode = WSARecv(connection
			,&wsabuffer //this is the parameter the errorcode are talking about.

			,1
			,0
			,0
			,
			&wsaoverlapped
			,rcompletion
			);

if(m_errorcode == SOCKET_ERROR)
cout << error(WSAGetLastError()) << endl;

I understand that I cant send a buffer that will be out of scope when this funktion ends o {}, so i tested with new but the same problem. Is there another address pool (space) i can allocate in?
http://www.gamedev.net/community/forums/topic.asp?topic_id=158864

This topic is closed to new replies.

Advertisement