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
 

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

Similar Threads


Back
Top