package wayland

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Send messages over a Unix-domain socket.

type t = < S.transport ; close : unit Lwt.t ; socket : Lwt_unix.file_descr >
val of_socket : Lwt_unix.file_descr -> t
val socket_path : ?wayland_display:string -> unit -> string

socket_path () returns the path to the wayland socket to use.

  1. If $WAYLAND_DISPLAY is set then it returns that. If the path is relative then "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" is used.
  2. If $WAYLAND_DISPLAY is not set, it defaults to "wayland-0".
  • parameter wayland_display

    Use this as the value of $WAYLAND_DISPLAY instead of reading it from the environment.

val connect : unit -> t Lwt.t

connect () connects to the Wayland server's socket:

  1. If $WAYLAND_SOCKET is set then that file descriptor is used.
  2. Otherwise, socket_path () is used.
OCaml

Innovation. Community. Security.