?
Solved

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

Posted on 1998-09-26
8
Medium Priority
?
173 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 270 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

777 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