package wayland

  1. Overview
  2. Docs
Pure OCaml Wayland protocol library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

wayland-2.2.tbz
sha256=0f882060a4cfe9424ed397676b8e2aaa931d84610beb29cb2ec9c355d1819625
sha512=847781a3d274da7463ad1a2e46bada3663b8dee08fa576ad787e7ba35cb0f39a3e1a0e6e9729db2f643885a35ae32ece0358c5897d31b68907cad44f1b26af31

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.