From 7897c927b23554daf862ac7c5eca1d4f369a292d Mon Sep 17 00:00:00 2001 From: iproctor Date: Wed, 8 Aug 2007 01:43:39 +0000 Subject: 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 --- test/ocaml/client/Makefile | 2 +- test/ocaml/server/Makefile | 5 +++-- test/ocaml/server/TestServer.ml | 10 +++++++++- 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'test/ocaml') 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 -- cgit v1.2.1