Solved

Socket programming with VC++5.0

Posted on 1998-04-30
5
198 Views
Last Modified: 2013-11-19
I want to make a client-server communication simulator on PC.
I'm wondering what is the best structure for it.
Using Serialize? Or just socket function?
Please let me know the best structure for my program.
And I hope to get the simple example code about it.
On my communication simulator, various data sizes and forms are used.
Thanks
0
Comment
Question by:lmh99
5 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 1304570
You're talking about two different things here.  

Serialization is the process where objects prepare themselves to be sent somewhere serially.  It may be just to a disk file for later retrieval but may also be to be sent over a network link.

Sockets are just one of the ways a Windows program might choose to communicate with another program either locally or on a remote system.  WINSOCK would be the lowest level of TCP/IP communications programming on a Windows platform.  This would probably work best if you need a lot of control of what's going on.  The drawback is that there are a lot of details to manage.  MFC provides some higher level classes to handle network connections CSocket and it's relatives are useful.  Microsoft also provides some COM objects that provide even higher levels of abstraction and functionality.  

At this point, I'd recommend you get a good book on the basics of Windows network programming.  A good starting place is "Programming Winsock" by Arthur Dumas (SAMS Publishing)
0
 

Author Comment

by:lmh99
ID: 1304571
I need some sample source codes of server and client.
Thanks.
0
 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1304572
Take a look at the samples ChatSrvr (server) and Chatter (client) in \vc\samples\mfc\advanced on your CD or harddisk in Visual C++.
0
 

Author Comment

by:lmh99
ID: 1304573
I have VC++5.0 sample code.
What I need is simpler one.
I want to understand the structure of socket communication
so I need a code that can describe the structure of it briefly.
Thanks.
0
 

Accepted Solution

by:
santoroa earned 50 total points
ID: 1304574
0

Featured Post

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.

Join & Write a Comment

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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…
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

743 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

9 Experts available now in Live!

Get 1:1 Help Now