locked
Socket Programming in VC++ .Net RRS feed

  • Question

  •  

    I need to learn socket programming in VC++ .Net can anyone teach me that?

    Tuesday, April 29, 2008 11:57 AM

Answers

  • I apologize, I didn't read your thread properly. I missed the ".NET" bit. I assumed you meant to work in native VC++ and winsock directly. Ignore my link.

    In .NET, you can find everything related to sockets in, System.Net.Sockets namespace. You won't find much resources for working with .NET sockets in C++/CLR but you can find plenty of resources for C# socket programming. Although, C# is different, you should be able to convert C# code to C++/CLR format fairly easily.

    Again, knowledge of threading, etc is still important and its equally important to learn from good networking design patterns right from the start before you go deep in to it which is the major problem in many networking applications. Its easy to learn things, difficult to unlearn and learn it again.

    Since your are in to .NET sockets, you can look in to WCF (Windows Communication Foundation). There is no IDE support for WCF and VC++ the last time I tried but neverthless, its an interesting technology and I highly recommend you check it out.

    If you are interested or have experience in working with IRCs (Internet Relay Chat), I can give you an IRC base library I am working on or you can look at other chatting protocols like JABBER. Learning from the source code of simple text messaging protocols is one of the best way to learn sockets easily.

    • Marked as answer by Akshay Daniel Sunday, February 11, 2018 3:01 PM
    Wednesday, May 14, 2008 7:18 AM

All replies

  • Socket programming (winsock) at its basics, is fairly straightforward. A simple google/live search will give you plenty of step-by-step tutorials with working samples.

     

    The challenge is not really in the core coding but in the understanding of networking as a whole. You must familiarize yourself with proven design patterns in networking which requires a lot of theory in the first place. I found this tutorial series which looks good (I haven't really read in detail, just did a quick search for you): http://www.tenouk.com/Winsock/Winsock2story.html

     

    I would also suggest to get an in depth understanding in threading/parallels, etc before you jump in to sockets. Any good networking application is heavily multithreaded.

    Saturday, May 10, 2008 3:22 PM
  • Thank u for ur response ....

    Actually i wanted to do .net specific development as i felt it's easier to code in VC++ .Net  than using  C++  or MFC.....

    I'll read the document and if any doubts come than i'll come back to u

     

    Monday, May 12, 2008 12:26 PM
  • I apologize, I didn't read your thread properly. I missed the ".NET" bit. I assumed you meant to work in native VC++ and winsock directly. Ignore my link.

    In .NET, you can find everything related to sockets in, System.Net.Sockets namespace. You won't find much resources for working with .NET sockets in C++/CLR but you can find plenty of resources for C# socket programming. Although, C# is different, you should be able to convert C# code to C++/CLR format fairly easily.

    Again, knowledge of threading, etc is still important and its equally important to learn from good networking design patterns right from the start before you go deep in to it which is the major problem in many networking applications. Its easy to learn things, difficult to unlearn and learn it again.

    Since your are in to .NET sockets, you can look in to WCF (Windows Communication Foundation). There is no IDE support for WCF and VC++ the last time I tried but neverthless, its an interesting technology and I highly recommend you check it out.

    If you are interested or have experience in working with IRCs (Internet Relay Chat), I can give you an IRC base library I am working on or you can look at other chatting protocols like JABBER. Learning from the source code of simple text messaging protocols is one of the best way to learn sockets easily.

    • Marked as answer by Akshay Daniel Sunday, February 11, 2018 3:01 PM
    Wednesday, May 14, 2008 7:18 AM
  • Oh thanks for telling me i was wondering how was that link related to my query

    I am also interested in that IRC's but please give some documentation with it, if possible...........

     

    Thanks Again

    Friday, May 16, 2008 8:43 AM
  • You can do a bit of searching to know more about IRCs. You will be able to find out how to log in to IRC networks, etc.

    Since we need to get down to its protocol implementation, its better to have a live chat.

    MSN/GTalk - jetblazer@gmail.com
    E-Mail - jetblazer@jetblazer.com
    Saturday, May 17, 2008 2:58 AM
  • I got an e-book on socket programming but its for Visual Studio 2003 

    I'll first study and get few concepts  about socket programming and also gather some info about IRC then probably i'll be in a better state for discussion.........

    Thanks again i'll finish my study by the end of this week then we can discuss .............

    Saturday, May 17, 2008 11:22 AM
  • Socket programming is a way of connecting two nodes on a network to communicate with each other. One socket(node) listens on a particular port at an IP, while other socket reaches out to the other to form a connection. Server forms the listener socket while client reaches out to the server.


    Friday, September 13, 2019 8:22 AM