[英]how to set tcp.nodelay when i use httpurlconnection
How to set tcp.nodelay
for below given code: 如何为以下给定代码设置
tcp.nodelay
:
URL url = new URL(urlText);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
As far as I am aware you cannot set tcp.noDelay
on `HttpURLConnection' as this does not allow any interface to alter underlaying tcp socket. 据我所知,您无法在“ HttpURLConnection”上设置
tcp.noDelay
,因为这不允许任何接口更改底层tcp套接字。
What I can recommend is try using Apache http client as it provide mechanism to set multiple TCP options. 我建议您尝试使用Apache http客户端,因为它提供了设置多个TCP选项的机制。 Have a look at this DefaultHttpClient
看看这个DefaultHttpClient
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.