Link to home
Start Free TrialLog in
Avatar of jcorbin
jcorbin

asked on

Using Sockets

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.
Avatar of MikeP090797
MikeP090797

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.
ASKER CERTIFIED SOLUTION
Avatar of MikeP090797
MikeP090797

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial