Commit Graph

863 Commits

Author SHA1 Message Date
David Reiss
c654416843 THRIFT-129. csharp: Make all Thrift structures extend TBase
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@732081 13f79535-47bb-0310-9956-ffa450edef68
2009-01-06 19:49:33 +00:00
David Reiss
6319133cac THRIFT-25. csharp: Various compiler and library improvements
Compiler:
- Thrift structures are serializable.
- The member fields of thrift structures are now private and only accessible
  through Properties, which keep the appropriate __isset up to date.

Library
- Addition of TBufferedTransport, which can be used to wrap other Transports.
- Addition of TThreadedServer, which manually manages threads instead of
  relying on .NET ThreadPool.
- Servers use a log delegate that defaults to System.Console but allows
  servers to use log4net without introducing the dependency.

ThriftTest Visual Studio Project
- Test client and server that use ThriftTest.thrift. The project references
  thrift.exe and Thrift.dll from the subversion tree and automatically builds
  generated code. This makes it very easy to test changes in both the compiler
  and library.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@732079 13f79535-47bb-0310-9956-ffa450edef68
2009-01-06 19:49:22 +00:00
Kevin Clark
d6b7182df5 THRIFT-246. rb: Generate #struct_fields rather than reflect.
Author: Bryan Duxbury


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@731806 13f79535-47bb-0310-9956-ffa450edef68
2009-01-06 01:34:28 +00:00
Kevin Clark
41baeaba96 THRIFT-157. rb: Quote strings and qualify class names properly
Author: Dave Engberg


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@731763 13f79535-47bb-0310-9956-ffa450edef68
2009-01-05 23:10:17 +00:00
Kevin Clark
bcb4cf83e5 THRFIT-231. rb: Make Thrift::Structs hashable
Author: Bryan Duxbury


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@731760 13f79535-47bb-0310-9956-ffa450edef68
2009-01-05 23:00:22 +00:00
David Reiss
b936ffdbd1 THRIFT-191. java: Create a static field id -> name map for each struct
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@731720 13f79535-47bb-0310-9956-ffa450edef68
2009-01-05 21:02:52 +00:00
T Jake Luciani
0d738890ba THRIFT-2: check for thrift::socket handle being null
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@728860 13f79535-47bb-0310-9956-ffa450edef68
2008-12-23 03:12:50 +00:00
T Jake Luciani
a60df1fab4 THRIFT-190. Added dependency check to perl Makefile
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@728678 13f79535-47bb-0310-9956-ffa450edef68
2008-12-22 13:13:56 +00:00
Kevin Clark
083c07a265 rb: Thrift.check_type should check struct classes [THRIFT-185]
Author: Piotr Kozikowski


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@726156 13f79535-47bb-0310-9956-ffa450edef68
2008-12-13 02:39:20 +00:00
David Reiss
322e595c2a THRIFT-203. cpp: Make library headers compile under g++ -pedantic
It turns out that trailing commas in enum definitions are
not actually valid C++.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@723562 13f79535-47bb-0310-9956-ffa450edef68
2008-12-05 02:54:09 +00:00
David Reiss
fbb14ef1b3 THRIFT-214. cpp: Qualify a cast to fix OSX compilation
id_t is defined in some OSX header, and the id_t in this function
resolved to that one instead of Thread::id_t.  This change fully
qualifies the type to make sure it resolves properly.

Also remove a comment about eliminating the C-style cast, since it
is actually quite appropriate in this case.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@722337 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 02:32:25 +00:00
David Reiss
428d5695ab THRIFT-215. cpp: Disable an assertion that fails on various platforms
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@722336 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 02:22:01 +00:00
David Reiss
04c315946c THRIFT-81. java: TNonblockingServer: Support a limit on read buffer size
This change makes it possible to set a maximum amount of memory that
TNonblockingServer will use for all read buffers (combined).
If it is exceeded, no new data will be read from clients until
memory is freed.  The current implementation does a busy wait in
the main thread when this happens.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@719741 13f79535-47bb-0310-9956-ffa450edef68
2008-11-21 23:07:05 +00:00
David Reiss
8c28df2569 Fix "make distclean" when Ruby is not in use
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@719379 13f79535-47bb-0310-9956-ffa450edef68
2008-11-20 21:24:18 +00:00
Kevin Clark
1d5a1f6500 rb: Remove extra validate in read [THRIFT-207]
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@719126 13f79535-47bb-0310-9956-ffa450edef68
2008-11-19 23:24:12 +00:00
Kevin Clark
031baf7086 Merge branch 'THRIFT-143'
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@714070 13f79535-47bb-0310-9956-ffa450edef68
2008-11-14 17:11:39 +00:00
Kevin Clark
713623bee6 rb: Validate struct _after_ read. [THRIFT-206]
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@714069 13f79535-47bb-0310-9956-ffa450edef68
2008-11-14 17:09:52 +00:00
Kevin Clark
159383f789 rb: raise if an object is serialized without required fields [THRIFT-143]
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@712945 13f79535-47bb-0310-9956-ffa450edef68
2008-11-11 05:46:04 +00:00
David Reiss
74421273ad THRIFT-67. python: Add TNonblockingServer
This TNonblockingServer is very similar to the C++ implementation.
It assumes the framed transport, but it uses select instead of libevent.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@712306 13f79535-47bb-0310-9956-ffa450edef68
2008-11-07 23:09:31 +00:00
Kevin Clark
762e9bd15f rb: Performance tweaks in Struct#initialize [THRIFT-188]
Author: Bryan Duxbury


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@709313 13f79535-47bb-0310-9956-ffa450edef68
2008-10-31 00:39:20 +00:00
David Reiss
080991bf98 THRIFT-186. erl: Make the Makefile work on OpenSolaris
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@709086 13f79535-47bb-0310-9956-ffa450edef68
2008-10-30 04:28:42 +00:00
David Reiss
d90cd1f539 THRIFT-168. cpp: Clear transport buffers before a flush
Previously, TBufferedTransport and TFramedTransport could
leave data in their buffers if a flush threw an exception.
This patch makes them reset their internal pointers before
flushing to the underlying transport.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@709037 13f79535-47bb-0310-9956-ffa450edef68
2008-10-29 22:50:34 +00:00
David Reiss
826e648354 THRIFT-177. cpp: Add a missing "std::"
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@706418 13f79535-47bb-0310-9956-ffa450edef68
2008-10-20 21:29:07 +00:00
Kevin Clark
7dc7f75e7c rb: Create constants for field ids in generated structs [THRIFT-165]
Author: Bryan Duxbury


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@705330 13f79535-47bb-0310-9956-ffa450edef68
2008-10-16 19:15:20 +00:00
Kevin Clark
6ca3881f51 rb: Update HTTPClientSpec for THRIFT-156
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@705329 13f79535-47bb-0310-9956-ffa450edef68
2008-10-16 19:14:47 +00:00
Kevin Clark
c248560897 rb: Support SSL and correct Content-Type in HTTPClient [THRIFT-156]
Author: Dave Engberg


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@704994 13f79535-47bb-0310-9956-ffa450edef68
2008-10-15 19:06:18 +00:00
Mark Slee
4f1bbc7e8a THRIFT-170: Buffered transports leave data in write buffer on failed flush
Reviewed By: mcslee



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@704714 13f79535-47bb-0310-9956-ffa450edef68
2008-10-14 22:05:11 +00:00
Mark Slee
fc8a1e0469 THRIFT-169: Fixes framed/buffered transport state on underlying flush failure
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@704710 13f79535-47bb-0310-9956-ffa450edef68
2008-10-14 22:00:36 +00:00
David Reiss
c53a5944ed Fix a compile bug introduced by r702644
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@702672 13f79535-47bb-0310-9956-ffa450edef68
2008-10-07 23:55:24 +00:00
David Reiss
9837aaf097 THRIFT-145. java: Make TNonblockingServer more robust against errors
TNonblockingServer was throwing a null pointer exception in certain cases.
We're not really sure what the root cause is, but this change prevents
the exception and also improves logging of certain undesirable conditions.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@702661 13f79535-47bb-0310-9956-ffa450edef68
2008-10-07 23:03:47 +00:00
David Reiss
e11f3073f7 THRIFT-149. cpp: Make TNonblockingServer handle a shut-down ThreadManager
This is a step toward implementing a graceful shutdown.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@702644 13f79535-47bb-0310-9956-ffa450edef68
2008-10-07 21:39:19 +00:00
David Reiss
58434e6988 THRIFT-108. python: Fix call to PyDict_Next in fastbinary.c
The position parameter is supposed to be a Py_ssize_t*, not an int*.
This was probably just an oversight in the original patch, and it
was preventing maps from serializing properly on x86-64.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@702640 13f79535-47bb-0310-9956-ffa450edef68
2008-10-07 21:08:10 +00:00
David Reiss
f67ad9e68a THRIFT-130. java: Eliminate frame{Read,Write} from TFramedTransport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@692185 13f79535-47bb-0310-9956-ffa450edef68
2008-09-04 18:23:29 +00:00
Kevin Clark
5ad6d4a7e3 rb: Add pretty inspect, optional field hint for Thrift::Struct
Author: Bryan Duxbury


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@689193 13f79535-47bb-0310-9956-ffa450edef68
2008-08-26 20:02:07 +00:00
Kevin Clark
969c04b912 rb: Add FramedTransport#borrow/consume! [THRIFT-117]
This addition makes FramedTransport BinaryProtocolAccelerated ready.

Author: Bryan Duxbury


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@688901 13f79535-47bb-0310-9956-ffa450edef68
2008-08-25 22:16:45 +00:00
Kevin Clark
38a2ce635d rb: Speed up Struct#initialize for optional fields [THRFIT-112]
Struct#initialize previously walked over every field and checked for
default values before assigning nil. The new approach assigns defaults
only to fields that have defaults, and lets Ruby handle nil ivars.

Author: Bryan Duxbury


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@688891 13f79535-47bb-0310-9956-ffa450edef68
2008-08-25 21:34:19 +00:00
Kevin Clark
14fe791ef3 Merge branch 'THRIFT-103'
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@682458 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 18:46:19 +00:00
David Reiss
4ad40d7c23 java: Specify in build.xml that we are using Java 1.5
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@682453 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 18:38:36 +00:00
Kevin Clark
a2693c135e rb: Check container elements when Thrift.type_checking = true [THRIFT-104]
Author: Kevin Ballard <kevin@rapleaf.com>


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@681863 13f79535-47bb-0310-9956-ffa450edef68
2008-08-01 22:04:09 +00:00
David Reiss
e29995e75b THRIFT-48. python: Make TServerSocket work with Unix-domain sockets
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@681467 13f79535-47bb-0310-9956-ffa450edef68
2008-07-31 20:15:17 +00:00
Kevin Clark
3af9287a74 rb: Support raise Xception, message for Structs that inherit from ::Exception [THRIFT-58]
Author: Kevin Ballard <kevin@rapleaf.com>


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@680542 13f79535-47bb-0310-9956-ffa450edef68
2008-07-28 22:20:36 +00:00
Kevin Clark
c8190174dc rb: Add ext/ to loadpath so BinaryProtocolAccelerated specs pass
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@680539 13f79535-47bb-0310-9956-ffa450edef68
2008-07-28 22:16:34 +00:00
Kevin Clark
5ebb23b3e1 rb: Ensure the transport is closed if an exception is raised serializing data in Client.send_message [THRIFT-75]
Author: Kevin Ballard <kevin@rapleaf.com>


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@680538 13f79535-47bb-0310-9956-ffa450edef68
2008-07-28 22:16:28 +00:00
David Reiss
1f5ce50186 THRIFT-99. php: Add scheme (http[s], etc.) support to THttpClient
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@680211 13f79535-47bb-0310-9956-ffa450edef68
2008-07-27 23:41:13 +00:00
David Reiss
0c7d38cf83 rb: Teach BinaryProtocolAccelerated to encode strings with NULs [THRIFT-97]
This patch adds a spec and fixes the behavior to properly treat strings as binary
blobs of data instead of as C strings when writing to the transport.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679899 13f79535-47bb-0310-9956-ffa450edef68
2008-07-25 21:06:06 +00:00
David Reiss
72754e198f rb: Spec out Thrift::BinaryProtocolAccelerated [THRIFT-90]
Convert most of the BinaryProtocol spec into shared examples and
add specific specs for encode_binary/decode_binary.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679898 13f79535-47bb-0310-9956-ffa450edef68
2008-07-25 21:06:03 +00:00
David Reiss
3899248d29 rb: BinaryProtocolAccelerated should use Thrift::ProtocolException [THRIFT-89]
BinaryProtocolAccelerated references the deprecated name TProtocolException,
when it should be using Thrift::ProtocolException.
It also uses rb_raise() instead of rb_exc_raise().


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679897 13f79535-47bb-0310-9956-ffa450edef68
2008-07-25 21:05:59 +00:00
David Reiss
6144e428d5 THRIFT-64. java: Allow TServerSocket to bind to a specific IP address
Add a new constructor to TServerSocket that accepts an InetSocketAddress
and binds to that address.  Define the old constructor (which just takes
a port) in terms of the new one.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679505 13f79535-47bb-0310-9956-ffa450edef68
2008-07-24 19:20:32 +00:00
David Reiss
5317b1ecd2 THRIFT-95. cpp: Fix write buffer initialization in TBufferedTransport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679500 13f79535-47bb-0310-9956-ffa450edef68
2008-07-24 19:10:16 +00:00
David Reiss
46e8d0b8fb THRIFT-94. erlang: Fix a syntax error
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@678659 13f79535-47bb-0310-9956-ffa450edef68
2008-07-22 06:57:41 +00:00