Socket vs TCP socket

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

    Socket vs TCP socket

    I need to talk to another application by sending a byte array across
    the wire. In fact, the application sitting on the other end of the
    wire is reads byte stream using c sockets ( not sure if language
    interoperabilit y is relevant here). I am debating whether i should
    add a layer and use TCPSocket class or use an old-fashion row socket
    class. I am using .net 2.0.

    What is ongoing practice?

    Thanks
  • =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?=

    #2
    Re: Socket vs TCP socket

    Hi,

    you can use a TCPClient/TCPServer if you only need
    to run on a TCP/IP connection. But if you want to control
    any aspect of the communication, you can use the Socket
    class. I personally use TCPClient/Server for most of my
    applications. You dont have to care what the language on
    the other end of the socket is, since the socket will get a
    byte stream (if you use tsream sockets!), and the TCP/IP
    protocol and its stacks have to take care of the flow,
    integrity, etc,..

    The only thing you should take care of is about stuff
    like Text (UNICODE/ANSI), the other end should
    know how it must parse the byte-stream to handle it
    the right way,...


    Regards

    Kerem

    --
    -----------------------
    Beste Grüsse / Best regards / Votre bien devoue
    Kerem Gümrükcü
    Latest Project: http://www.codeplex.com/restarts
    Latest Open-Source Projects: http://entwicklung.junetz.de
    -----------------------
    "This reply is provided as is, without warranty express or implied."
    "puzzlecrac ker" <ironsel2000@gm ail.comschrieb im Newsbeitrag
    news:0169638a-a375-4337-ae1a-e97a627642d8@p1 0g2000prf.googl egroups.com...
    >I need to talk to another application by sending a byte array across
    the wire. In fact, the application sitting on the other end of the
    wire is reads byte stream using c sockets ( not sure if language
    interoperabilit y is relevant here). I am debating whether i should
    add a layer and use TCPSocket class or use an old-fashion row socket
    class. I am using .net 2.0.
    >
    What is ongoing practice?
    >
    Thanks

    Comment

    • Peter Duniho

      #3
      Re: Socket vs TCP socket

      On Tue, 14 Oct 2008 18:15:53 -0700, puzzlecracker <ironsel2000@gm ail.com>
      wrote:
      I need to talk to another application by sending a byte array across
      the wire. In fact, the application sitting on the other end of the
      wire is reads byte stream using c sockets ( not sure if language
      interoperabilit y is relevant here). I am debating whether i should
      add a layer and use TCPSocket class or use an old-fashion row socket
      class. I am using .net 2.0.
      >
      What is ongoing practice?
      I'm not aware of any class named "TCPSocket" .

      The Socket class should work fine. There's also TcpListener and
      TcpClient, but IMHO they don't really add that much to the Socket class.

      Pete

      Comment

      Working...