Solved

Socket programming with VC++5.0

Posted on 1998-04-30
5
242 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
[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
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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 outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

729 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