This is my first thread on this board, so bear with me. I was scanning through some code, and noticed the send() function.
It looks like it only sends text. What if you wanted to send something else? That's all for now.
Printable View
This is my first thread on this board, so bear with me. I was scanning through some code, and noticed the send() function.
It looks like it only sends text. What if you wanted to send something else? That's all for now.
You send() bytes. These bytes might form a sentence, a number (character or binary level encoding), or maybe a data type like a struct. It's up to you, just give send a valid pointer, tell it the length of data to send, and off you go.
Okay, Do I need to know winsock for DirectPlay?
I'm guessing for send() you would cast the data, because the prototype says char*, unless I'm mistaken:) :D
You're not mistaken. You send() sizeof(theData) bytes, starting from (char*)&theData ;)Quote:
I'm guessing for send() you would cast the data, because the prototype says char*, unless I'm mistaken