Solved

Socket programming with VC++5.0

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

Independent Software Vendors: 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
post4 challenge 28 121
Execute multiple curl cmds with sleep and send output to file 10 121
Work with App store 7 121
Windows shortcut location resolution on double click open 4 76
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.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

739 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