CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2011
    Posts
    1

    Questions for writing a TCP/IP chat application in Visual C++ 2010

    So, I have decided to learn Visual C++ and am trying to learn by reading a book + making simple programs. I am now at a point where I want to learn about TCP/IP. I want to build a simple chat program, so you can talk between a server and client.

    I don't know if MFC or CLR are better for such application. I understand CLR is managed and you need .NET to run these applications. This also means MFC will generally be faster. What other pros/cons am I missing for these when writing a tcp/ip application?

    Can someone please explain which would be easier to use if I wanted to write a chat server + client over tcp/ip? From my google search, it seems MFC is not a good option for what I want to do. Should I use CLR? Also, any good resources for learning how to make this program in CLR?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,398

    Re: Questions for writing a TCP/IP chat application in Visual C++ 2010

    Well, since you asked it in the Visual C++ Programming forum (where the native C++ is discussed, not a managed one) I"d recommend you to use MFC class CAsyncSocket for your task. There is a very good essay with a sample code for both server and client sides: An MFC Asynchronous Socket Example Done Right
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured