S
Shlomy Shivek
Hi,
I have this thread function:
//handle one socket connection thread
DWORD WINAPI SocketHandler(LPVOID lpvParam)
{
int socketNumber=*(DWORD*)lpvParam ; //the socket number
int n;
char end_connection[]={"$Exit$\n"}; //end connection message
char buffer[BUFSIZE];
n = read(socketNumber,buffer,BUFSIZE);
if (n < 0) //error reading
exit(1); //exit thread
while(strcmp(buffer,end_connection)) //until end connection has
reached
Message* x=new Message(buffer);
return 0;
}
for some reason I get the following error :
error C3861: 'read': identifier not found, even with argument-dependent
lookup
this happens using vs.net 2003 enviroment for win32 console
application.
I have the following declerations at the top of the file:
#include <iostream>
#include <winsock.h>
#include <windows.h>
#include "Message.h"
#include "MessageQueue.h"
using namespace std;
#pragma comment(lib, "ws2_32.lib")
Any idea what the problem might be ?
I have this thread function:
//handle one socket connection thread
DWORD WINAPI SocketHandler(LPVOID lpvParam)
{
int socketNumber=*(DWORD*)lpvParam ; //the socket number
int n;
char end_connection[]={"$Exit$\n"}; //end connection message
char buffer[BUFSIZE];
n = read(socketNumber,buffer,BUFSIZE);
if (n < 0) //error reading
exit(1); //exit thread
while(strcmp(buffer,end_connection)) //until end connection has
reached
Message* x=new Message(buffer);
return 0;
}
for some reason I get the following error :
error C3861: 'read': identifier not found, even with argument-dependent
lookup
this happens using vs.net 2003 enviroment for win32 console
application.
I have the following declerations at the top of the file:
#include <iostream>
#include <winsock.h>
#include <windows.h>
#include "Message.h"
#include "MessageQueue.h"
using namespace std;
#pragma comment(lib, "ws2_32.lib")
Any idea what the problem might be ?