From: Christopher Piro Date: Tue, 8 Jan 2008 03:14:19 +0000 (+0000) Subject: [thrift] in erlang add {nodelay, true} and {reuseaddr, true} to gen_tcp socket options X-Git-Tag: 0.2.0~1057 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=26484fb7b145a10a3aa8f3b396a32c4f5b85236c;p=common%2Fthrift.git [thrift] in erlang add {nodelay, true} and {reuseaddr, true} to gen_tcp socket options 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 --- diff --git a/lib/erl/src/transport/tSocket.erl b/lib/erl/src/transport/tSocket.erl index 5aead1e7..17928934 100644 --- a/lib/erl/src/transport/tSocket.erl +++ b/lib/erl/src/transport/tSocket.erl @@ -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, _} ->