add a start and stop fn
This commit is contained in:
parent
cebb5cb5b0
commit
f3ca71b509
1 changed files with 16 additions and 8 deletions
24
bin/main.ml
24
bin/main.ml
|
@ -1,15 +1,23 @@
|
||||||
open Pusk.Net
|
open Pusk.Net
|
||||||
open Pusk.Drivers
|
open Pusk.Drivers
|
||||||
|
|
||||||
let main =
|
let start driver =
|
||||||
let session_id = get_session in
|
let name_driver = prepare driver in
|
||||||
let body = close_session session_id in
|
let data_driver = run_process name_driver [] in
|
||||||
print_endline body
|
let session_id = get_session () in
|
||||||
|
data_driver, session_id
|
||||||
;;
|
;;
|
||||||
|
|
||||||
let () =
|
let stop (driver_process, session_id) =
|
||||||
let driver = prepare (Gecko "0.33.0") in
|
let data = close_session session_id in
|
||||||
let driver_process = run_process driver [] in
|
print_endline data;
|
||||||
main;
|
|
||||||
stop_process driver_process
|
stop_process driver_process
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
let main () = ()
|
||||||
|
|
||||||
|
let () =
|
||||||
|
let data = start (Gecko "0.33.0") in
|
||||||
|
main ();
|
||||||
|
stop data
|
||||||
|
;;
|
||||||
|
|
Loading…
Reference in a new issue