package wayland

  1. Overview
  2. Docs
Pure OCaml Wayland protocol library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

wayland-2.3.tbz
sha256=10627a94f4cef97147991528fcd246f8f27ccbf3026eafdece995b53ee9468a0
sha512=8e319dc236d04cc9084bf81782497899dca12a392d649a2ac7bd1d5edc1101ebe2bc266a033e23ab9ed46a8b692018bc47005036d10872f7825f4aa4009ab825

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. *)