Socket vs TCP socket

P

puzzlecracker

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
interoperability 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
 
K

Kerem Gümrükcü

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

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top