Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Winsock is randomly erroring out...

Posted on 2000-05-16
9
Medium Priority
?
180 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 60 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying 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…
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 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 viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

927 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