diff options
| author | Devendra | 2015-04-24 10:47:07 +0530 | 
|---|---|---|
| committer | Devendra | 2015-04-24 10:47:07 +0530 | 
| commit | 3aa150b81bf7f0159086ce0ec61b9171fdeb670a (patch) | |
| tree | 61957598066638f0d9184596d8b291a4d047de80 /Pubnub.py | |
| parent | 51c546fbb00d7cc02af1c6cdace19b3cf3e1b7a2 (diff) | |
| download | pubnub-python-3aa150b81bf7f0159086ce0ec61b9171fdeb670a.tar.bz2 | |
merging osx 10.9 fix from Jay to develop
Diffstat (limited to 'Pubnub.py')
| -rw-r--r-- | Pubnub.py | 16 | 
1 files changed, 15 insertions, 1 deletions
| @@ -79,7 +79,21 @@ if sys.platform.startswith("linux"):      ]  elif sys.platform.startswith("darwin"):      # From /usr/include/netinet/tcp.h -    socket.TCP_KEEPALIVE = 0x10 # idle time used when SO_KEEPALIVE is enabled + +    # idle time used when SO_KEEPALIVE is enabled +    socket.TCP_KEEPALIVE = socket.TCP_KEEPALIVE \ +        if hasattr(socket, 'TCP_KEEPALIVE') \ +        else 0x10 + +    # interval between keepalives +    socket.TCP_KEEPINTVL = socket.TCP_KEEPINTVL \ +        if hasattr(socket, 'TCP_KEEPINTVL') \ +        else 0x101 + +    # number of keepalives before close +    socket.TCP_KEEPCNT = socket.TCP_KEEPCNT \ +        if hasattr(socket, 'TCP_KEEPCNT') \ +        else 0x102      default_socket_options += [          # Send first keepalive packet 200 seconds after last data packet | 
