Solved

Winsock is randomly erroring out...

Posted on 2000-05-16
9
175 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
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 viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
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.

734 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