Solved

Winsock is randomly erroring out...

Posted on 2000-05-16
9
167 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
ID: 2815191
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
ID: 2815307
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
ID: 2816310
the buffer of send() is not end with '\0' character. if you done like this :
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Expert Comment

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

Expert Comment

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

Accepted Solution

by:
BKnet earned 30 total points
ID: 2816349
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
ID: 2816716
Doesnt cin.getline do that for you?
0
 

Expert Comment

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

Author Comment

by:beyonddeath
ID: 2818637
Adjusted points from 25 to 30
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

770 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