Solved

Using Sockets

Posted on 1998-12-18
2
182 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
[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
  • 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

Technology Partners: 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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

724 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