0

im just wondering how you use send() and recv()

like:

bool blah()
{
	if(recv(send("10.1.1.1", "HI"), szBuffer, sizeof(szBuffer))
	{
		MessageBox(NULL, "WORKED", "??", MB_OK);
		return true;
	}	
	else
	{
		MessageBox(NULL, "FAIL", "??", MB_OK);
		return false;
	}
}

i know that wouldnt compile but you get the point?

2
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by FTProtocol
-2

i dont need smart ass remarks.

edit: figured it myself.... although its slow "connecting" and when it cant "connect" i get an access violation. any ideas why?

bool TestConnection(char *IP)
{
	connection conn = connect_to_server(IP, 6500);

	if(rrecv(conn, szBuffer, sizeof(szBuffer)))
	{
		endconnection(conn);
		return true;
	}	
	else
	{
		endconnection(conn);
		return false;
	}
}
Votes + Comments
Truly an idiot.
Are you certain that was the tone of the post?
0

> i dont need smart ass remarks.
Fine, here's a "I don't give a rats ass" reply.

Plenty, but I'm not going to say a damn thing.

Votes + Comments
What a third class pedantic you are iamthwee.
The *ass* belongs to the rat, therefore rat's must contain an apostrophe.
-2

again i dont need spammers and i worked out my problem.

Votes + Comments
Yup. The person with the most reputation on daniweb is a spammer.
Fine.
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.