Noob-like simple Questions [Archive] - C Board

PDA

View Full Version : Noob-like simple Questions


Stan100
10-15-2003, 06:26 PM
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.

Hammer
10-15-2003, 06:35 PM
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.

Stan100
10-21-2003, 04:58 PM
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

Hunter2
10-22-2003, 09:24 PM
I'm guessing for send() you would cast the data, because the prototype says char*, unless I'm mistakenYou're not mistaken. You send() sizeof(theData) bytes, starting from (char*)&theData ;)