File: nbMsgContainer.mli

package info (click to toggle)
sks 1.1.6-14
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,296 kB
  • sloc: ml: 15,228; ansic: 1,069; sh: 358; makefile: 347
file content (27 lines) | stat: -rw-r--r-- 915 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module type MsgMarshal =
  sig
    type msg_t
    val marshal : Channel.out_channel_obj -> msg_t -> unit
    val unmarshal : Channel.in_channel_obj -> msg_t
    val to_string : msg_t -> string
    val print : string -> unit
  end
module Container :
  functor (Msg : MsgMarshal) ->
    sig
      val bufc : Channel.buffer_out_channel
      type msg_container = { msg : Msg.msg_t; }
      val marshal_noflush :
        < outchan : out_channel; write_int : int -> 'a; .. > ->
        Msg.msg_t -> unit
      val marshal :
        < flush : 'a; outchan : out_channel; write_int : int -> 'b; .. > ->
        Msg.msg_t -> 'a
      val last_length : int option ref
      val try_unmarshal :
        < fd : Unix.file_descr; read_int : int; read_string : int -> string;
          .. > ->
        msg_container option
      val unmarshal :
        < read_int : int; read_string : int -> string; .. > -> msg_container
    end