module Netamqp_rtypes: sig
.. end
Support for remote types not already covered by
Rtypes
Integers
Short
type
uint2 = int
val read_uint2 : string -> int -> uint2
val read_uint2_unsafe : string -> int -> uint2
val write_uint2 : string -> int -> uint2 -> unit
val write_uint2_unsafe : string -> int -> uint2 -> unit
val uint2_as_string : uint2 -> string
Strings
val decode_shortstr : string -> int Pervasives.ref -> int -> string
val decode_longstr : string -> int Pervasives.ref -> int -> string
val encode_shortstr : string -> string list * int
val encode_longstr : string -> string list * int
Tables
Convention:
Sint<n>
: signed integer with n bytes
Uint<n>
: unsigned integer with n bytes
Note that there is confusion about what is allowed in tables, see
http://dev.rabbitmq.com/wiki/Amqp091Errata. For best compatibility
one should only use
`Sint4
,
`Decimal
,
`Longstr
,
`Timestamp
,
`Table
, and
`Null
.
type ('a, 'b)
table_field_standard = [ `Decimal of int * Rtypes.uint4
| `Longstr of string
| `Null
| `Sint4 of Rtypes.int4
| `Table of 'b
| `Timestamp of float ]
type ('a, 'b)
table_field_ok = [ `Bool of bool | `Double of float | `Float of float | `Sint1 of int ]
type ('a, 'b)
table_field_problematic = [ `Array of 'a list
| `Shortstr of string
| `Sint2 of int
| `Sint8 of Rtypes.int8
| `Uint1 of int
| `Uint2 of int
| `Uint4 of Rtypes.uint4
| `Uint8 of Rtypes.uint8 ]
type
table_field = [ `Bool of bool
| `Decimal of int * Rtypes.uint4
| `Double of float
| `Float of float
| `Longstr of string
| `Null
| `Sint1 of int
| `Sint4 of Rtypes.int4
| `Table of table
| `Timestamp of float ]
type
table = (string * table_field) list
val decode_table : string -> int Pervasives.ref -> int -> table
val encode_table : table -> string list * int
Misc
val unsafe_rev_concat : string list -> int -> string
val mk_mstring : string -> Xdr_mstring.mstring