Solved

Using Sockets

Posted on 1998-12-18
2
181 Views
Last Modified: 2013-11-20
I'd like to know how to use, in a MFC program, sockets to send and recieve data. I am working on a client application that will need to connect and send data to various other machines. It really seems simple but I am soooo lost. Everything in the MFC samples on the VC++ 5 cd involves using archives, and the other end will not always be a windows machine. I'm pretty familiar with MFC programming, so I would just need an example of how to declare the Socket and send and how to hook the listening end up.
0
Comment
Question by:jcorbin
  • 2
2 Comments
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1326394
The basics are those:
1. Create a derived class from CSocket or CAsyncSocket
2. For a client side, use Connect to connect to the host
3. Use Send to send data
4. In the OnReceive handler, use Receive to receive the data.

If you need any more help, just ask.
0
 
LVL 8

Accepted Solution

by:
MikeP090797 earned 100 total points
ID: 1326395
The basics are those:
1. Create a derived class from CSocket or CAsyncSocket
2. For a client side, use Connect to connect to the host
3. Use Send to send data
4. In the OnReceive handler, use Receive to receive the data.

If you need any more help, just ask.
0

Featured Post

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
fizzArray2 challenge 1 102
has77  challenge 9 98
haveThree challenge 22 123
Not needed 13 129
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

733 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