471,350 Members | 1,793 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

TcpClient and HttpWebRequest

Hi all,

I have an application which uses HttpWebRequest to get data from other
sites. I'm trying to convert the application to use TcpClient (or Socket)
since I need to bind the connection to a local endpoint for each request.

Is there a component which performs all the tasks that the HttpWebRequest
performs but enables me to bind each request to a local endpoint or a link
to a code sample that would explain how to do so.

Thanks,
Daniel
Dec 27 '05 #1
1 3982

"Yair Nissan" <ya**@yairnis.com> wrote in message
news:eC**************@TK2MSFTNGP11.phx.gbl...
Hi all,

I have an application which uses HttpWebRequest to get data from other
sites. I'm trying to convert the application to use TcpClient (or Socket)
since I need to bind the connection to a local endpoint for each request.

Is there a component which performs all the tasks that the HttpWebRequest
performs but enables me to bind each request to a local endpoint or a link
to a code sample that would explain how to do so.


In .NET 2.0 the ServicePoint has a method to manually assign the local
endpoint:

ServicePoint.BindIPEndPointDelegate
http://msdn2.microsoft.com/en-us/lib...tdelegate.aspx

In .NET 1.1 you'll need to reimplement HTTP yourself. As a hint, try using
HTTP 1.0. It's substantially easier to implement from scratch than HTTP
1.1.

David
Dec 27 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Daniel | last post: by
3 posts views Thread by מורדי | last post: by
10 posts views Thread by Abubakar | last post: by
3 posts views Thread by Ricardo Quintanilla | last post: by
reply views Thread by Torsten Brasch | last post: by
reply views Thread by sternr | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.