Skip to content

Commit

Permalink
try socket options
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccuskey committed May 2, 2015
1 parent 4244aa7 commit 0d939f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dmc_corona/dmc_sockets/async_tcp.lua
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ function ATCPSocket:connect( host, port, params )
end

self._socket:settimeout( 0 ) -- need to re-set for wrapped socket
self._socket:setoption( 'keepalive', true )
self._socket:setoption( 'tcp-nodelay', true )

end

Expand Down
Empty file modified dmc_corona/dmc_sockets/ssl_params.lua
100644 → 100755
Empty file.
4 changes: 4 additions & 0 deletions dmc_corona/dmc_sockets/tcp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ function TCPSocket:connect( host, port, params )
if success then
self._status = TCPSocket.CONNECTED
self._socket:settimeout(0)
self._socket:setoption( 'keepalive', true )
self._socket:setoption( 'tcp-nodelay', true )

self._master:_connect( self )

Expand Down Expand Up @@ -321,6 +323,8 @@ function TCPSocket:_createSocket( params )
self._status = TCPSocket.NOT_CONNECTED

self._socket:settimeout( params.timeout )
self._socket:setoption( 'keepalive', true )
self._socket:setoption( 'tcp-nodelay', true )

end

Expand Down

0 comments on commit 0d939f4

Please sign in to comment.