Solved

Winsock is randomly erroring out...

Posted on 2000-05-16
9
163 Views
Last Modified: 2012-05-05
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)
0
Comment
Question by:beyonddeath
  • 5
  • 3
9 Comments
 

Expert Comment

by:NicholasFerguson
Comment Utility
client is not using memccpy, memchr, memcmp, memcpy, memmove,  memset  -
     memory operations on data submitted to client's tcp/ip send function
0
 

Author Comment

by:beyonddeath
Comment Utility
ok so how do i do that (sorry im still learning winsock)  if im sending a character or character string
0
 

Expert Comment

by:BKnet
Comment Utility
the buffer of send() is not end with '\0' character. if you done like this :
0
 

Expert Comment

by:BKnet
Comment Utility
the buffer of send() is not end with '\0' character. if you done like this :
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Expert Comment

by:BKnet
Comment Utility
the buffer of send() is not end with '\0' character. if you done like this :
0
 

Accepted Solution

by:
BKnet earned 30 total points
Comment Utility
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
 

Author Comment

by:beyonddeath
Comment Utility
Doesnt cin.getline do that for you?
0
 

Expert Comment

by:BKnet
Comment Utility
You can give me your source : mailAddr is bknet_2000@yahoo.com
0
 

Author Comment

by:beyonddeath
Comment Utility
Adjusted points from 25 to 30
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now