I want to make a Server that reply to my Sockets. I have a code like this:
#define DEFAULT_BUFLEN 512
/*...*/
int iResult;
int iSendResult;
char recvbuf[DEFAULT_BUFLEN];
int recvbuflen = DEFAULT_BUFLEN;
/*...*/
iResult = recv(ClientSocket, recvbuf, recvbuflen, 0);
if (recvbuf == "hello"){
iSendResult = send(ClientSocket, "Hi Client", sizeof("Hi Client"), 0);
}else {printf("[ERROR]Unexpected Socket.\n"); }
Now, it doesn't work. and I don't now why. I try to searck something online (whit poor results). How can I make it works? I'm willing to change all the code.