Specify which Network Card/Connection Winhttp Must Use

拈花ヽ惹草 提交于 2019-12-10 10:29:48

问题


I have an application in C# that utilizes Winhttp to make web requests. Is there a way to specify which network card WinHTTP must utilize for its connections?


回答1:


There is no publically available option for WinHTTP or WinInet to do Interface Affinity. It appears to be supported in System.Net via the BindIPEndPointDelegate on the Request's ServicePoint.

I am curious what the scenario is to force a specific interface since it points to a problem in the rest of the stack to need such a thing.




回答2:


WinHTTP is at the wrong spot on the OSI model to deal with hardware level stuff like that. You're going to want to look at modifying the routing table instead.



来源:https://stackoverflow.com/questions/1463059/specify-which-network-card-connection-winhttp-must-use

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!