blob: db3ac3bcb91a05b9bec071e0b7f66921d5344ab4 [file] [log] [blame]
open Thrift
module S = TServer
class t pf st tf ipf opf =
object
inherit S.t pf st tf ipf opf
method serve =
try
st#listen;
let c = st#accept in
let trans = tf#getTransport c in
let inp = ipf#getProtocol trans in
let op = opf#getProtocol trans in
try
while (pf#process inp op) do () done;
trans#close
with e -> trans#close; raise e
with _ -> ()
end