mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-21 19:13:29 +01:00
This commit is contained in:
parent
34f996064e
commit
2234050bf7
@ -63,11 +63,11 @@ end
|
|||||||
|
|
||||||
module Connect_msg : sig
|
module Connect_msg : sig
|
||||||
type t = Tcp | Inproc | Ipc
|
type t = Tcp | Inproc | Ipc
|
||||||
val create : typ:string -> t
|
val create : string -> t
|
||||||
val to_string : t -> string
|
val to_string : t -> string
|
||||||
end = struct
|
end = struct
|
||||||
type t = Tcp | Inproc | Ipc
|
type t = Tcp | Inproc | Ipc
|
||||||
let create ~typ =
|
let create typ =
|
||||||
match typ with
|
match typ with
|
||||||
| "tcp" -> Tcp
|
| "tcp" -> Tcp
|
||||||
| "inproc" -> Inproc
|
| "inproc" -> Inproc
|
||||||
@ -515,9 +515,9 @@ let of_string s =
|
|||||||
| Connect_ socket ->
|
| Connect_ socket ->
|
||||||
Connect (Connect_msg.create socket)
|
Connect (Connect_msg.create socket)
|
||||||
| NewJob_ { state ; push_address_tcp ; push_address_inproc } ->
|
| NewJob_ { state ; push_address_tcp ; push_address_inproc } ->
|
||||||
Newjob (Newjob_msg.create push_address_tcp push_address_inproc state)
|
Newjob (Newjob_msg.create ~address_tcp:push_address_tcp ~address_inproc:push_address_inproc ~state)
|
||||||
| EndJob_ state ->
|
| EndJob_ state ->
|
||||||
Endjob (Endjob_msg.create state)
|
Endjob (Endjob_msg.create ~state)
|
||||||
| GetData_ { state ; client_id ; key } ->
|
| GetData_ { state ; client_id ; key } ->
|
||||||
GetData (GetData_msg.create ~client_id ~state ~key)
|
GetData (GetData_msg.create ~client_id ~state ~key)
|
||||||
| PutData_ { state ; client_id ; key } ->
|
| PutData_ { state ; client_id ; key } ->
|
||||||
|
@ -776,7 +776,7 @@ let run ~port =
|
|||||||
Zmq.Socket.create zmq_context Zmq.Socket.rep
|
Zmq.Socket.create zmq_context Zmq.Socket.rep
|
||||||
in
|
in
|
||||||
Zmq.Socket.set_linger_period rep_socket 1_000_000;
|
Zmq.Socket.set_linger_period rep_socket 1_000_000;
|
||||||
bind_socket "REP" rep_socket port;
|
bind_socket ~socket_type:"REP" ~socket:rep_socket ~port;
|
||||||
|
|
||||||
let initial_program_state =
|
let initial_program_state =
|
||||||
{ queue = Queuing_system.create () ;
|
{ queue = Queuing_system.create () ;
|
||||||
|
Loading…
Reference in New Issue
Block a user