Socket class disadvantages

  • Thread starter Thread starter Piotrekk
  • Start date Start date
P

Piotrekk

Hi

I have a question related to Socket class. What are the advantages /
disadvantages of using Socket class comparing to TcpClient and
HttpWebRequest

Regards
Piotr Ko³odziej
 
Piotr,

Well, when using the TcpClient vs the Socket, you probably want to use
the client most of the time, since it exposes the underlying Socket through
the Client property.

Now, comparing those to HttpWebRequest, with HttpWebRequest, it wraps
all of the protocol interaction for you, forming the request, parsing the
response, etc, etc. You don't have that with the TcpClient/Socket.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hi

I have a question related to Socket class. What are the advantages /
disadvantages of using Socket class comparing to TcpClient and
HttpWebRequest

Regards
Piotr Ko³odziej
 
Socket can be used for UDP packets, the others can't.


Hi

I have a question related to Socket class. What are the advantages /
disadvantages of using Socket class comparing to TcpClient and
HttpWebRequest

Regards
Piotr Ko³odziej
 
Back
Top