diff options
author | iproctor <dev-null@apache.org> | 2007-08-08 01:43:39 +0000 |
---|---|---|
committer | iproctor <dev-null@apache.org> | 2007-08-08 01:43:39 +0000 |
commit | 7897c927b23554daf862ac7c5eca1d4f369a292d (patch) | |
tree | 8546785c24de22ef38cb4642815234bec46bc901 /test/ocaml | |
parent | 6148175aea790e2e009e4605917967dfd5e58158 (diff) | |
download | thrift-7897c927b23554daf862ac7c5eca1d4f369a292d.tar.gz |
Thrift: OCaml and HS servers more general
Summary: The library now provides servers that are general like the other languages.
Reviewed by: mcslee
Test plan: Yes
Revert plan: yes
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665195 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/ocaml')
-rw-r--r-- | test/ocaml/client/Makefile | 2 | ||||
-rw-r--r-- | test/ocaml/server/Makefile | 5 | ||||
-rw-r--r-- | test/ocaml/server/TestServer.ml | 10 |
3 files changed, 13 insertions, 4 deletions
diff --git a/test/ocaml/client/Makefile b/test/ocaml/client/Makefile index 67757b9cf..ce284eaf3 100644 --- a/test/ocaml/client/Makefile +++ b/test/ocaml/client/Makefile @@ -1,6 +1,6 @@ SOURCES = ../gen-ocaml/ThriftTest_types.ml ../gen-ocaml/ThriftTest_consts.ml ../gen-ocaml/SecondService.ml ../gen-ocaml/ThriftTest.ml TestClient.ml RESULT = tc -INCDIRS = "/home/iproctor/code/projects/thrift/trunk/lib/ocaml/src/" "../gen-ocaml/" +INCDIRS = "../../../lib/ocaml/src/" "../gen-ocaml/" LIBS = unix thrift all: nc OCAMLMAKEFILE = ../../../lib/ocaml/OCamlMakefile diff --git a/test/ocaml/server/Makefile b/test/ocaml/server/Makefile index 839292d1a..88a618ac2 100644 --- a/test/ocaml/server/Makefile +++ b/test/ocaml/server/Makefile @@ -1,7 +1,8 @@ SOURCES = ../gen-ocaml/ThriftTest_types.ml ../gen-ocaml/ThriftTest_consts.ml ../gen-ocaml/SecondService.ml ../gen-ocaml/ThriftTest.ml TestServer.ml RESULT = ts -INCDIRS = "/home/iproctor/code/projects/thrift/trunk/lib/ocaml/src/" "../gen-ocaml/" -LIBS = unix thrift +INCDIRS = "../../../lib/ocaml/src/" "../gen-ocaml/" +LIBS = thrift +THREADS = yes all: nc OCAMLMAKEFILE = ../../../lib/ocaml/OCamlMakefile include $(OCAMLMAKEFILE) diff --git a/test/ocaml/server/TestServer.ml b/test/ocaml/server/TestServer.ml index 378903539..afcd7895b 100644 --- a/test/ocaml/server/TestServer.ml +++ b/test/ocaml/server/TestServer.ml @@ -102,6 +102,14 @@ end;; let h = new test_handler in let proc = new ThriftTest.processor h in let port = 9090 in - TServer.run_basic_server proc port;; +let pf = new TBinaryProtocol.factory in +let server = new TThreadedServer.t + proc + (new TServerSocket.t port) + (new Transport.factory) + pf + pf +in + server#serve |