diff options
| author | Manuel Stoeckl <code@mstoeckl.com> | 2021-03-02 23:24:16 -0500 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2025-06-08 16:20:35 +0000 |
| commit | 387adc6a794df6bee114396612d5a6accab318c3 (patch) | |
| tree | 1086acb5918def7a9fc1d1389f594cba44ebc43e | |
| parent | cursor: Properly check realloc for errors (diff) | |
| download | wayland-387adc6a794df6bee114396612d5a6accab318c3.tar wayland-387adc6a794df6bee114396612d5a6accab318c3.tar.gz wayland-387adc6a794df6bee114396612d5a6accab318c3.tar.bz2 wayland-387adc6a794df6bee114396612d5a6accab318c3.tar.lz wayland-387adc6a794df6bee114396612d5a6accab318c3.tar.xz wayland-387adc6a794df6bee114396612d5a6accab318c3.tar.zst wayland-387adc6a794df6bee114396612d5a6accab318c3.zip | |
server: Document wl_display_add_socket_auto
The exact sequence of names tried has de facto become part of the API.
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
| -rw-r--r-- | src/wayland-server.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/wayland-server.c b/src/wayland-server.c index 96dd417..1566764 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -1808,6 +1808,24 @@ _wl_display_add_socket(struct wl_display *display, struct wl_socket *s) return 0; } + +/** Automatically pick a Wayland display socket for the clients to connect to. + * + * \param display Wayland display to which the socket should be added. + * \return The socket name if success. NULL if failed. + * + * This adds a Unix socket to Wayland display which can be used by clients to + * connect to Wayland display. The name of the socket is chosen automatically + * as the first available name in the sequence "wayland-0", "wayland-1", + * "wayland-2", ..., "wayland-32". + * + * The string returned by this function is owned by the library and should + * not be freed. + * + * \sa wl_display_add_socket + * + * \memberof wl_display + */ WL_EXPORT const char * wl_display_add_socket_auto(struct wl_display *display) { |
