Solved

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

Posted on 1998-09-26
8
167 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
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
 
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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 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.

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now