TCPClient and Asyncronous Socket Problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • alex002

    #1

    TCPClient and Asyncronous Socket Problem

    Dear all,

    I am writing to a C# program to connect to the telnet server and getting
    data; however, I know that I can use either TCPClient and Asyncronous Socket
    to do the program. However, I don't know which is better and why. Can any
    one tell me about this? Thank you for all of your help.

    Alex


  • Pieter Philippaerts

    #2
    Re: TCPClient and Asyncronous Socket Problem

    "alex002" <alex@f-technology.com> wrote in message[color=blue]
    > I am writing to a C# program to connect to the telnet server and[/color]
    getting[color=blue]
    > data; however, I know that I can use either TCPClient and Asyncronous[/color]
    Socket[color=blue]
    > to do the program. However, I don't know which is better and why. Can any
    > one tell me about this? Thank you for all of your help.[/color]

    Neither of them is better, they're just different. The TcpClient is a
    somewhat more high-level class than the Socket class and a little bit easier
    to work with. The Socket class is often considered to be a little bit more
    difficult than the TcpClient class but offers more options.

    Basically, it all depends on the programmer's taste. If you like working
    with streams, the TcpClient is the best choice. If streams are not your
    thing, you may want to check out the Socket class.

    Regards,
    Pieter Philippaerts
    Managed SSL/TLS: http://www.mentalis.org/go.php?sl


    Comment

    Working...