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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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
All Courses

From novice to tech pro — start learning today.