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?

By writing a function called sendAndReceive, which returns a boolean.

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;
	}
}
commented: Truly an idiot. -2
commented: 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.

commented: What a third class pedantic you are iamthwee. +9
commented: The *ass* belongs to the rat, therefore rat's must contain an apostrophe. -3

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

commented: Yup. The person with the most reputation on daniweb is a spammer. -2
commented: Fine. -2