mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-10-09 09:23:05 +02:00
This commit is contained in:
parent
34f996064e
commit
2234050bf7
@ -63,11 +63,11 @@ end
|
||||
|
||||
module Connect_msg : sig
|
||||
type t = Tcp | Inproc | Ipc
|
||||
val create : typ:string -> t
|
||||
val create : string -> t
|
||||
val to_string : t -> string
|
||||
end = struct
|
||||
type t = Tcp | Inproc | Ipc
|
||||
let create ~typ =
|
||||
let create typ =
|
||||
match typ with
|
||||
| "tcp" -> Tcp
|
||||
| "inproc" -> Inproc
|
||||
@ -515,9 +515,9 @@ let of_string s =
|
||||
| Connect_ socket ->
|
||||
Connect (Connect_msg.create socket)
|
||||
| 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 (Endjob_msg.create state)
|
||||
Endjob (Endjob_msg.create ~state)
|
||||
| GetData_ { state ; client_id ; key } ->
|
||||
GetData (GetData_msg.create ~client_id ~state ~key)
|
||||
| PutData_ { state ; client_id ; key } ->
|
||||
|
@ -776,7 +776,7 @@ let run ~port =
|
||||
Zmq.Socket.create zmq_context Zmq.Socket.rep
|
||||
in
|
||||
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 =
|
||||
{ queue = Queuing_system.create () ;
|
||||
|
Loading…
Reference in New Issue
Block a user