[thrift] in erlang add {nodelay, true} and {reuseaddr, true} to gen_tcp socket options
authorChristopher Piro <cpiro@apache.org>
Tue, 8 Jan 2008 03:14:19 +0000 (03:14 +0000)
committerChristopher Piro <cpiro@apache.org>
Tue, 8 Jan 2008 03:14:19 +0000 (03:14 +0000)
Summary: for parity with the C++ implementation

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok

Other Notes: contributed by Todd Lipcon (todd@amiestreet.com)

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665415 13f79535-47bb-0310-9956-ffa450edef68

lib/erl/src/transport/tSocket.erl

index 5aead1e..1792893 100644 (file)
@@ -71,7 +71,8 @@ effectful_setHandle(This, Handle) ->
 effectful_open(This) ->
     Host = oop:get(This, host),
     Port = oop:get(This, port),
-    Options = [binary, {packet, 0}, {active, false}],
+    Options = [binary, {packet, 0}, {active, false}, {reuseaddr, true},
+               {nodelay, true}],
 
     case gen_tcp:connect(Host, Port, Options) of
         {error, _} ->