Winsock is randomly erroring out...

Why is this in my program i randomly get garbage sent instead of what i know the client is sending the server (prints it out client side...) but it comes as about 3 screens full of garbage.  

Thanks for any help if you want the source give me your email, (its my sad attempt at a mud server)
beyonddeathAsked:
Who is Participating?
 
BKnetConnect With a Mentor Commented:
I think that the buffer of send() is not end with '\0' character. if you copy the buffer to an other buf and the and of the buf is '\0'. I'sure the it is well for you
0
 
NicholasFergusonCommented:
client is not using memccpy, memchr, memcmp, memcpy, memmove,  memset  -
     memory operations on data submitted to client's tcp/ip send function
0
 
beyonddeathAuthor Commented:
ok so how do i do that (sorry im still learning winsock)  if im sending a character or character string
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
BKnetCommented:
the buffer of send() is not end with '\0' character. if you done like this :
0
 
BKnetCommented:
the buffer of send() is not end with '\0' character. if you done like this :
0
 
BKnetCommented:
the buffer of send() is not end with '\0' character. if you done like this :
0
 
beyonddeathAuthor Commented:
Doesnt cin.getline do that for you?
0
 
BKnetCommented:
You can give me your source : mailAddr is bknet_2000@yahoo.com
0
 
beyonddeathAuthor Commented:
Adjusted points from 25 to 30
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.