package wayland

  1. Overview
  2. Docs
Pure OCaml Wayland protocol library

Install

Dune Dependency

Authors

Maintainers

Sources

wayland-2.1.tbz
sha256=0ffb53958954f1ed4ef874a122c071a9cf3de77ae341b963eb7b513d8028f3c1
sha512=e391b91b4161ada44339bb97b0acf40a0ef3d3c8f62a114333a61155b70288b31b5904492ebbf187bad957849ff6e1df172d014f46ffc33db7140fa833449f5c

doc/src/wayland/s.ml.html

Source file s.ml

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
28
29
30
31
open Eio.Std

(** A transport is used to send and receive bytes and file descriptors.
    Typically this will just call the usual Unix [sendmsg] and [recvmsg] functions,
    but other transports are possible. *)
class type transport = object
  method send : Cstruct.t -> Eio_unix.Fd.t list -> unit
  (** [send data fds] transmits the bytes of [data] and the file descriptors in [fds]. *)

  method recv : sw:Switch.t -> Cstruct.t -> int * Eio_unix.Fd.t list
  (** [recv buffer] reads incoming data from the remote peer.
      The data is read into [buffer] and the method returns the number of bytes
      read and the list of attached file descriptors. *)

  method shutdown : unit
  (** Shut down the sending side of the connection. This will cause the peer to read end-of-file. *)

  method up : bool
  (** [up] is [true] until the transport has sent or received an end-of-file
      (indicating that the connection is being shut down).
      This can be accessed via {!Proxy.transport_up}. *)

  method pp : Format.formatter -> unit
  (** Can be used for logging. *)
end

type ('a, 'role) user_data = ..
(** Extra data that can be attached to a proxy of type ['a] with ['role]. *)

type ('a, 'role) user_data += No_data
(** The default user data for a proxy. *)
OCaml

Innovation. Community. Security.