Repository: thrift Updated Branches: refs/heads/master 42b9be191 -> 417b631c5
THRIFT-3198 Allow construction of TTransportFactory with a specified maxLength Client: Go Patch: Sean <[email protected]> This closes #521 Project: http://git-wip-us.apache.org/repos/asf/thrift/repo Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/417b631c Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/417b631c Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/417b631c Branch: refs/heads/master Commit: 417b631c5a80c78eda58824a824782b15455ccc4 Parents: 42b9be1 Author: Jens Geyer <[email protected]> Authored: Mon Jun 22 22:21:27 2015 +0200 Committer: Jens Geyer <[email protected]> Committed: Mon Jun 22 22:21:27 2015 +0200 ---------------------------------------------------------------------- lib/go/thrift/framed_transport.go | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/thrift/blob/417b631c/lib/go/thrift/framed_transport.go ---------------------------------------------------------------------- diff --git a/lib/go/thrift/framed_transport.go b/lib/go/thrift/framed_transport.go index 21c636d..19fb85f 100644 --- a/lib/go/thrift/framed_transport.go +++ b/lib/go/thrift/framed_transport.go @@ -47,6 +47,10 @@ func NewTFramedTransportFactory(factory TTransportFactory) TTransportFactory { return &tFramedTransportFactory{factory: factory, maxLength: DEFAULT_MAX_LENGTH} } +func NewTFramedTransportFactoryMaxLength(factory TTransportFactory, maxLength int) TTransportFactory { + return &tFramedTransportFactory{factory: factory, maxLength: maxLength} +} + func (p *tFramedTransportFactory) GetTransport(base TTransport) TTransport { return NewTFramedTransportMaxLength(p.factory.GetTransport(base), p.maxLength) }
