Solved

Help!!!Help!!!MayDay!!!Socket problem

Posted on 1998-09-26
8
172 Views
Last Modified: 2010-04-01

 I am using a CSocket class for transferring info.between two pts.say ,Point1 & Point2.Both point1 and point2 send and receive data.First point1 sends a message and point2 receives it  without problem.Then point2 sends data using the same socket but the data is not received.When I use a TRY block for the Flush() I get a generic exception.I am using a CSocketFile and CArchive.I have also tried to send the data thru a CAsyncSocket::send() fn.It returns a SOCKET_ERROR but when I check for specific exceptions using GetLastError() none is thrown.

    Thanks in advance for Ur replies.
0
Comment
Question by:prats_sr
[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
8 Comments
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1173779
Please post some of your code.  With it, we can probably help you better.  Thanks.
0
 
LVL 3

Expert Comment

by:zhongbing
ID: 1173780
for socket problem, you should give more clue:
such as if the connectiong still exist(use netstat to see)?
if the point2 can ping point1?
also the code will help
0
 
LVL 1

Expert Comment

by:andla
ID: 1173781
I'm new to this CSocket. I would be grateful if you could explain what i can do with it and witch file is nessesary to include. If this become clear i could perhaps help you with my old C experience.

Your sincerely
Andla
0
Industry Leaders: 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!

 
LVL 2

Accepted Solution

by:
lucidity earned 90 total points
ID: 1173782
http://www.geocities.com/ResearchTriangle/Lab/5376/Spells/GServer/index.html

This is a generic server app which will accept connections then send a response. It does not use any MFC classes so catching exceprions is not a problem.
0
 
LVL 1

Expert Comment

by:andla
ID: 1173783
Only if sombody want to answer.
Generic Server?

Hmm when trying to find what Generic means it shows up the word general in the MSVC++ 4.1 tutorial. Must be a bug. Not that i'm beginner but some knowledge does escape my mind.

Yours sincerely
andla
0
 
LVL 2

Expert Comment

by:lucidity
ID: 1173784
Generic means it just accepts data and places it in a buffer for you to parse and respond.
0
 
LVL 1

Expert Comment

by:andla
ID: 1173785
Thanks lucidity. :-)
0
 
LVL 2

Expert Comment

by:lucidity
ID: 1173786
let me know how it works out
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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…
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.

688 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