KWin
Loading...
Searching...
No Matches
Classes | Macros | Functions
wl-socket.c File Reference
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/file.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/un.h>
#include <unistd.h>

Go to the source code of this file.

Classes

struct  wl_socket
 

Macros

#define _DEFAULT_SOURCE
 
#define UNIX_PATH_MAX   108
 
#define LOCK_SUFFIX   ".lock"
 
#define LOCK_SUFFIXLEN   5
 

Functions

void wl_socket_destroy (struct wl_socket *s)
 
const char * wl_socket_get_display_name (struct wl_socket *s)
 
int wl_socket_get_fd (struct wl_socket *s)
 
struct wl_socketwl_socket_create ()
 

Macro Definition Documentation

◆ _DEFAULT_SOURCE

#define _DEFAULT_SOURCE

Definition at line 11 of file wl-socket.c.

◆ LOCK_SUFFIX

#define LOCK_SUFFIX   ".lock"

Definition at line 32 of file wl-socket.c.

◆ LOCK_SUFFIXLEN

#define LOCK_SUFFIXLEN   5

Definition at line 33 of file wl-socket.c.

◆ UNIX_PATH_MAX

#define UNIX_PATH_MAX   108

Definition at line 29 of file wl-socket.c.

Function Documentation

◆ wl_socket_create()

struct wl_socket * wl_socket_create ( )

Allocate and create a socket It is bound and accepted

Definition at line 123 of file wl-socket.c.

◆ wl_socket_destroy()

void wl_socket_destroy ( struct wl_socket * socket)

Cleanup resources and close the FD

Definition at line 99 of file wl-socket.c.

◆ wl_socket_get_display_name()

const char * wl_socket_get_display_name ( struct wl_socket * s)

Returns the name of the socket, i.e "wayland-0"

Definition at line 113 of file wl-socket.c.

◆ wl_socket_get_fd()

int wl_socket_get_fd ( struct wl_socket * s)

Returns the file descriptor for the socket

Definition at line 118 of file wl-socket.c.