Browse Source

devicechannel: enable TCP socket keepalive

bboozzoo/device-cache
Maciek Borzecki 10 years ago
parent
commit
c3cd71b6b7
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/devicechannel.vala

+ 3
- 0
src/devicechannel.vala View File

@ -70,6 +70,9 @@ class DeviceChannel : Object {
// setup socket monitoring
Socket sock = _conn.get_socket();
// enable keepalive
sock.set_keepalive(true);
// prep source for monitoring events
SocketSource source = sock.create_source(IOCondition.IN | IOCondition.ERR |
IOCondition.HUP);
source.set_callback((src, cond) => {


Loading…
Cancel
Save