keep-alive

C# Console Application - Keep it running

风格不统一 提交于 2019-12-18 03:22:14
问题 I am about to develop a console application that will be required to continually run and carry out work at specific times. My question is what is are best methods or practices to keep your application alive? My thought were: A loop that never ends? A timer that sleeps and then jumps to routine when required (after set sleep period)? I will be compiling the application into an exe and then running it as a service using AlwaysUp. Regards.. Peter 回答1: A better solution would be to write a

Relation between HTTP Keep Alive duration and TCP timeout duration

风格不统一 提交于 2019-12-17 23:03:41
问题 I am trying to understand the relation between TCP/IP and HTTP timeout values. Are these two timeout values different or same? Most Web servers allow users to set the HTTP Keep Alive timeout value through some configuration. How is this value used by the Web servers? is this value just set on the underlying TCP/IP socket i.e is the HTTP Keep Alive timeout and TCP/IP Keep Alive Timeout same? or are they treated differently? My understanding is (maybe incorrect): The Web server uses the default

Under what circumstances will my browser attempt to re-use a TCP connection for multiple requests?

巧了我就是萌 提交于 2019-12-17 22:24:52
问题 I am using Firefox, but I'd like to know how browsers decide this in general. It seems that when I access the same URL twice in a short amount of time, my browser tries to re-use the TCP same connection for both requests (this is called keep-alive). However, when I access two different URLs (but still served by the same server ), the browser sometimes decides to open up a new connection for each request. Obviously, the browser does not use a one-connection-per-URL policy. I am asking this

HTTP keep-alive timeout

自古美人都是妖i 提交于 2019-12-17 18:02:02
问题 Can I specify the HTTP timeout or does the server impose a value? For example, if I do: telnet my.server.net 80 Trying X.X.X.X... Connected to my.server.net. Escape character is '^]'. GET /homepage.html HTTP/1.0 Connection: keep-alive Host: my.server.net HTTP/1.1 200 OK Date: Thu, 03 Oct 2013 09:05:28 GMT Server: Apache Last-Modified: Wed, 15 Sep 2010 14:45:31 GMT ETag: "1af210b-7b-4904d6196d8c0" Accept-Ranges: bytes Content-Length: 123 Vary: Accept-Encoding Keep-Alive: timeout=15, max=100

HttpsUrlConnection and keep-alive

旧街凉风 提交于 2019-12-17 17:45:15
问题 I am using com.sun.net.httpserver.HttpsServer in my current project which deals with client-authentification etc.. Currently it only prints out the clients address/port, so that I can check if one TCP-connection is used for multiple requests ( keep-alive ) or if a new connection is established for every request (and thus a new SSL-handshake is made every time). When I use FireFox to make multiple request against the server I can see that keep-alive is working. So the server part works fine

WCF wsHttpBinding with http keepalive

三世轮回 提交于 2019-12-17 16:07:28
问题 I have a WCF client which uses a wsHttpBinding, I would like to enable http keep-alive. I'm hoping I can turn this on by just changing the client config... I've found plenty of descriptions of how to turn on keep-alives for a basicHttp binding, but no luck with wsHttpBinding... is this possible? Many thanks. Here's my client binding: <wsHttpBinding> <binding name="WSHttpBinding_IRepositoryService" closeTimeout="00:00:10" openTimeout="00:00:10" receiveTimeout="00:05:00" sendTimeout="00:05:00"

setKeepAliveTimeout iOS behavior, exceeded 15 wakes in 300 sec

余生长醉 提交于 2019-12-17 10:46:43
问题 I am writing a VOIP application on iOS 5 and I am trying to understand how the actual communication can stay alive while in the background. I understand there is a maximum amount of wakes the socket can get per amount of time. My problem is that my socket connection receive too many wakes messages, because of that the app is terminated with crash message: exceeded 15 wakes in 300 sec What I really don't understand is how is the socket supposed to be able to constantly send and receive data

WebSockets ping/pong, why not TCP keepalive?

扶醉桌前 提交于 2019-12-17 06:29:25
问题 WebSockets have the option of sending pings to the other end, where the other end is supposed to respond with a pong. Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in response, unless it already received a Close frame. It SHOULD respond with Pong frame as soon as is practical. TCP offers something similar in the form of keepalive: [Y]ou send your peer a keepalive probe packet with no data in it and the ACK flag turned on. You can do this because of the TCP/IP specifications

How do I shutdown a Node.js http(s) server immediately?

。_饼干妹妹 提交于 2019-12-17 04:26:10
问题 I have a Node.js application that contains an http(s) server. In a specific case, I need to shutdown this server programmatically. What I am currently doing is calling its close() function, but this does not help, as it waits for any kept alive connections to finish first. So, basically, this shutdowns the server, but only after a minimum wait time of 120 seconds. But I want the server to shutdown immediately - even if this means breaking up with currently handled requests. What I can not do

对指定组件进行keep-alive缓存(Vue)

好久不见. 提交于 2019-12-14 19:52:36
keep-alive <keep-alive> 是一个抽象组件:它自身不会渲染一个 DOM 元素,主要用于保留组件状态或避免重新渲染 实际项目中: 对有网络请求的页面进行缓存,则重新回到该页面时,不会再请求数据,在一定程度上能减少网络请求,优化性能; 但在另一方面,如果返回上一页面时,需要刷新状态,此时就不太适用了 当组件在 <keep-alive> 内被切换,它的 activated 和 deactivated 这两个生命周期钩子函数将会被对应执行。可以在activated时进行刷新操作,但是这个做法则需要在每个要刷新都页面都写一次,效率太低。 对指定组件进行keep-alive缓存 做法1: 利用keep-alive的include或exclude属性(每个组件需要指定name,include和exclude属性需要对应组件name) <!-- com1.vue --> < template > ... </ template > < script > export default { name : "readMe1" ... } </ script > <!--对除了com1,com2的其他所有组件进行缓存【com1,com2不缓存】--> < keep-alive exclude = " com1,com2 " > < routerView /> </ keep-alive