visual c++ socket programming

Hi,

I'm new to socket programming as well as visual c++....I would like to create a simple client socket on windows that will connect to a server socket running on Linux. I've been reading the web, and am now confused between winsock and CAsyncSocket.

Can anyone help me on how I should get started? Which should I use? Any sample codes on very simple client/server connection? Maybe echo back a simple line of text?

thanx!
jade03Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Svetlin_PanayotovCommented:
CAsyncSocket is basically a wrapper for winsock.CSocket or CAsyncSocket are also MFC classes.For sample code - check this:
http://www.codeproject.com/internet/#Beginners
and http://www.codeproject.com/internet/#Client%2FServer+Development
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jade03Author Commented:
So, if I have a server, then a client connected to the server, then a GUI that will connect to the client, is it considered peer-to-peer between the GUI and the client? And will the connection code be similar to a normal client and server code?
0
Svetlin_PanayotovCommented:
Well it's better to look at the client and the GUI as a whole thing - but if you prefer it this way - yes - the code that connects the GUI and the client is "kind of" p2p.But if I got your question right - the client and the GUI are on the same machine - so they can communicate with windows messages, events, callbacks etc.

Svetlin
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

jade03Author Commented:
actually, I won't be implementing the client myself, but I think it will be running on Linux, and the GUI will be running on windows. So, can I still connect to the client using regular client/server socket connection?
0
Svetlin_PanayotovCommented:
Yes - you should be able to.
0
jade03Author Commented:
Thanx for all the tips, Svetlin! :)
0
Svetlin_PanayotovCommented:
You're welcome :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual C++.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.