the port in TServerSocket's constructor should be passed by keyword; the first positional param is actually the hostname
Reviewed By: dreiss
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1333163 13f79535-47bb-0310-9956-ffa450edef68
To ensure there are no include path collisions the C and C++ header
include paths should include 'thrift' as the root leaf. This will
prevent having to place /usr/include/thrift into the compilers include
header search path, which might otherwise result in the compiler
accidentally picking up headers that it shouldn't.
e.g. #include <foo/bar.h> should be #include <thrift/foo/bar.h>
Change-Id: I48f2b0f549bda0fc81e85506ac857adc800b98a1
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1325674 13f79535-47bb-0310-9956-ffa450edef68
Client: test
Patch: Ruslan Shevchenko
shared.thrft does not include namespace for php, so thrift compiler generate incorrect name
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1202653 13f79535-47bb-0310-9956-ffa450edef68
This patch adds a tutorial for CSharp. It also moves the 'test' client and server into the tutorial, because they were not being used by the tests.
Patch: Roger Meier
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1000953 13f79535-47bb-0310-9956-ffa450edef68
- Client is no longer a separate process.
- Simplified constructors moved into another module.
- All functions and exceptions return the new client,
to allow for future statefulness in the client.
NOTE: With the new library and old gen-code, attempting to call a
nonexistent function will result in an exit.
TODO: fix docs and tests (tether test is not meaningful)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990979 13f79535-47bb-0310-9956-ffa450edef68
My combined patch for THRIFT-599 was committed, but it is preferable
commit the individual patches to preserve the more detailed log and
blame data. I'll recommit r987018 as a sequence of patches and r988722
as its own rev.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990957 13f79535-47bb-0310-9956-ffa450edef68
The only user-visible changes are to the client. Every thrift call now returns {NewClient, Result} instead of just Result.
Patch: David Reiss (assist to Anthony Molinaro)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@987018 13f79535-47bb-0310-9956-ffa450edef68
This is the real change. The lexer now recognizes "oneway"
and warns on "async". All example and test IDLs have been
updated, as have the syntax files.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757994 13f79535-47bb-0310-9956-ffa450edef68
- Make the PHP generator use program->get_namespace("php")
instead of program->get_php_namespace()
- Eliminate the explicit "php_namespace" in t_program.
- Deprecate the php_namespace token.
- Update example .thrift files and syntax files.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@745241 13f79535-47bb-0310-9956-ffa450edef68
Library classes and tests have been moved to the proper package and directory structure, and references to com.facebook.thrift where replaced with org.apache.thrift throughout the code. The fb303 contrib project still contains com.facebook packages.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@734855 13f79535-47bb-0310-9956-ffa450edef68
- Make the Perl generator use program->get_namespace("perl")
instead of program->get_perl_package()
- Eliminate the explicit "perl_package" in t_program.
- Deprecate the perl_package token.
- Update example .thrift files and syntax files.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665624 13f79535-47bb-0310-9956-ffa450edef68
- Make the Smalltalk generator use program->get_namespace("smalltalk.*")
instead of program->get_smalltalk_{category|prefix}()
- Eliminate the explicit "smalltalk_{category|prefix}" in t_program.
- Deprecate the smalltalk_{category|prefix} tokens.
- Update example .thrift files and syntax files.
This was a little more complex than the others. We now convert "." to "-"
in Smalltalk categories, because we no longer lex them as tok_st_identifier.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665601 13f79535-47bb-0310-9956-ffa450edef68
- Make the Java generator use program->get_namespace("java")
instead of program->get_java_namespace()
- Eliminate the explicit "java_namespace" in t_program.
- Deprecate the java_namespace token.
- Update example .thrift files and syntax files.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665514 13f79535-47bb-0310-9956-ffa450edef68
- Make the C++ generator use program->get_namespace("cpp")
instead of program->get_cpp_namespace()
- Eliminate the explicit "cpp_namespace" in t_program.
- Deprecate the cpp_namespace token.
- Update example .thrift files and syntax files.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665513 13f79535-47bb-0310-9956-ffa450edef68
Summary:
make-generic is some sort of internal undocumented thing.
make-local is what is supposed to be used for this stuff.
Also use $(RM) instead of "rm -f".
Reviewed By: marc
Test Plan: make clean
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665498 13f79535-47bb-0310-9956-ffa450edef68
Summary:
- Expanded tabs to spaces where spaces were the norm.
- Deleted almost all trailing whitespace.
- Added newlines to the ends of a few files.
- Ran dos2unix on one file or two.
Reviewed By: mcslee
Test Plan: git diff -b
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665467 13f79535-47bb-0310-9956-ffa450edef68
Summary: Added examples for all examples except inheritance and application exception handling (divide by zero); looks like both are currently broken. Weak.
Reviewed By: eletuchy
Test Plan: works just like RubyClient.rb (modulo the commented out bits)
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665428 13f79535-47bb-0310-9956-ffa450edef68
Summary: we haven't had a client tutorial for the longest time -- added one that basically works. will iron the bugs out in due order.
Reviewed By: eletuchy
Test Plan: works when launched like server.sh
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665427 13f79535-47bb-0310-9956-ffa450edef68
Summary: Logger configuration (and all Thrift config in Erlang) now uses application:get_env/2 via thrift:config/2. Defaults can be provided on the erl command line with ``-config <filename>''. It may also be helpful to cascade config files; {key, value} pairs provided in subsequent files will override previous ones -- e.g. in our applications we use ``-config base.config -config cpiro.config''.
server.config was added as an example and server.sh was updated to invoke erl with ``-config server.config''.
Reviewed By: eletuchy
Test Plan: the tutorial server now outputs a reasonable set of messages
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665426 13f79535-47bb-0310-9956-ffa450edef68
Summary: thrift_logger changed a while back but the tutorial didn't keep up. fixed.
Reviewed By: eletuchy
Test Plan: compiles now :p
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665425 13f79535-47bb-0310-9956-ffa450edef68
Summary:
* got rid of most of the otp_base jonx ... save that for a future release unfortunately
* cleaned up the tutorial server, added -erl to tutorial.thrift's shebang
* made better README and TODO
Test Plan: checked out a copy, read my directions, built and ran the tutorial, and pretended that it didn't blow
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665273 13f79535-47bb-0310-9956-ffa450edef68
Summary:
* custom, extensible error logger -- show only relevant stuff
* clean up of errors in developer-supplied handler module
now gives sane error messages and doesn't crash whole server
(introduces tApplicationException_HANDLER_ERROR)
* more precise catch in tErlProcessor (exits gracefully only if
transport closes)
Reviewed By: iproctor
Test Plan: tutorial works
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665186 13f79535-47bb-0310-9956-ffa450edef68
Summary:
* shim to use object-oriented code as gen_servers
* high(er) performance Erlang-style server and transport
* sane packaging based on otp-base, i.e. Makefiles and real structure
Test Plan: tutorial server offers the same (subset of) functionality as previous version
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665164 13f79535-47bb-0310-9956-ffa450edef68
Summary:
* missing {list,map,set}s, inheritance is spotty
* loose source code, plus everything is one process (application / gen_server behavior is forthcoming)
* codegen is a mess, need t_fp_generator
Test Plan:
* codegen invoked without -erl generates identical code for test/
* calculatorHandler plus 'thrift -erl -r tutorial.thrift' more or less works
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665146 13f79535-47bb-0310-9956-ffa450edef68