Socket Programming in C#

First of all, I would like to thank the whole team of CrazyEngineers for wishing me on my birthday! πŸ˜€

And I wanted to ask if anyone could give me a good tutorial link of Multithreading in C#. Also can anyone tell me the difference between the classes Socket, Tcpclient and TcpListener in C#? Will be waiting for your replies. Thanks

Regards,
Cursed

Replies

  • savitha_chandu
    savitha_chandu
    The Socket class is not protocol specific and provides an abstraction for network communication. This way you can write code using a single set of semantics (Bind, Connect, Send, Receive, etc) regardless of the network protocols you wish you use. For example, you can write a Sockets-based application that uses IPv4 or IPv6 (and more ) as the network layer.

    TCPClient is a wrapper around the sockets class designed only for TCP over IPv4/v6 communication. This class is intended to make it simpler (less code) to write TCP based client side applications.

    TCPListener is another wrapper around the Socket class, but is designed to make it easy to create server side TCP over IPv4/v6 applications.

    Any sockets programming book or the MSDN documentation for the sockets class should further clarify the distinction.
    😁
  • savitha_chandu
    savitha_chandu
    savitha_chandu
    The Socket class is not protocol specific and provides an abstraction for network communication. This way you can write code using a single set of semantics (Bind, Connect, Send, Receive, etc) regardless of the network protocols you wish you use. For example, you can write a Sockets-based application that uses IPv4 or IPv6 (and more ) as the network layer.

    TCPClient is a wrapper around the sockets class designed only for TCP over IPv4/v6 communication. This class is intended to make it simpler (less code) to write TCP based client side applications.

    TCPListener is another wrapper around the Socket class, but is designed to make it easy to create server side TCP over IPv4/v6 applications.

    Any sockets programming book or the MSDN documentation for the sockets class should further clarify the distinction.
    😁
    Things turn out best for people who make the best of the way things turn out.
  • cursed
    cursed
    Thank you! Your reply was really helpful! πŸ˜€
  • geveruk
    geveruk
    C# socket programming

    #-Link-Snipped-#

    gvr.

You are reading an archived discussion.

Related Posts

Wishing our moderator, CEan MaRo a very happy & prosperous Birthday! 😁 😁😁😁 May your dreams come true and Project QREO attain newer heights! πŸŽ‰Party On! 😁
uBuntu fans, Beta 1 version of uBuntu 10.4 is available for download. Of course, since this is beta software, its not recommended for installation on production machines. Get your copy...
Name: -=[ TH3L3G3ND ]=- *Engineering Trade: COMPUTER SCIENCE Location: INDIA *Occupation: I AM A STUDENT Work Experience: - *Hobbies & Interests: I LOVE TO EXPLORE NEW THINGS AND FIND WAYS...
iWork suite: Apple has created a version of its iWork productivity suite optimised for the large, touch-screen interface of the iPad. Users can download the three programs – Pages, the...
Source: WordPress β€Ί Blog WordPress 3.0, Beta 1 WordPress lovers: Here's something that's nothing less than FANTASTIC! WordPress 3.0 beta has been released and it's got great new features! Most...