Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Winsock is randomly erroring out...

Posted on 2000-05-16
9
Medium Priority
?
179 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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

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!

Question has a verified solution.

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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
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…
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 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.

721 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