|
-
February 18th, 2008, 03:01 PM
#1
Sending data over Winsocks
Sorry, new to the forum, not really sure if this is the right place to post.
Anyways, I am just working on a server/client program which can send messages between each other. I'm able to send the messages, which are sent as a *char data type, but on the other end, I'm not sure how to validate the passed in data. For example, the server sends the message "x" to the client on connect using send(). On the client side, they will receive it using recv() into a variable buf (I did this: recv(csock, buf, sizeof(buf), 0), which works.) The only thing is I am not able to validate the buf variable, such as if(buf == "x" ) cout << something;... I am not sure how to handle the data coming through the sockets. Anyone that can give me some help on this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|