1 #ifndef _SOCKET_PROC_H_
2 #define _SOCKET_PROC_H_
Socket may be read from.
Definition: socket.h:38
Send notification on seek.
Definition: socket.h:50
Sock_WriteAsync write
Function to read from the socket.
Definition: socket.h:63
SOCK_ERROR Socket_WriteAsync(UID id, uint8_t *buffer, uint32_t size)
Request an asynchronous write to the socket.
Definition: socket.c:49
SOCK_FEATURES requested_features
The size of the struct. must be sizeof(SocketConnectionDesc)
Definition: socket.h:75
uint32_t(* Sock_SeekAsync)(uint64_t offset, int whence)
A pointer to a function that asynchronously performs a Socket seek.
Definition: socket.h:16
uint32_t(* Sock_ReadAsync)(uint8_t *buffer, uint32_t size)
A pointer to a function that asynchronously performs a Socket read.
Definition: socket.h:13
SOCK_ERROR
Socket errors.
Definition: socket.h:22
The description of the socket.
Definition: socket.h:57
Socket can send notifications into the message pump.
Definition: socket.h:40
SOCK_ERROR Socket_Connect(const char *name, SocketConnectionDesc *desc, UID *id)
Attempt to connect to a socket.
Definition: socket.c:17
SOCK_NOTIFICATIONS notifications
Features supported by the socket.
Definition: socket.h:67
uint64_t UID
Definition: types.h:8
Signals the completion of an asynchronous action for the current thread.
Definition: socket.h:53
Send no notifications.
Definition: socket.h:47
The socket does not exist.
Definition: socket.h:30
Socket is seekable.
Definition: socket.h:39
The socket is busy.
Definition: socket.h:28
SOCK_ERROR Socket_ReadAsync(UID id, uint8_t *buffer, uint32_t size)
Request an asynchronous read from the socket.
Definition: socket.c:37
uint32_t size
Definition: socket.h:73
SOCK_ERROR Socket_Disconnect(UID id)
Attempt to disconnect from the socket.
Definition: socket.c:29
uint32_t size
Definition: socket.h:59
const char name[MAX_PROC_NAME_LEN]
Definition: process_man.h:22
The description of the socket connection.
Definition: socket.h:71
Request supervisor level access.
Definition: socket.h:41
Socket can be written to.
Definition: socket.h:37
No features.
Definition: socket.h:36
Unknown error.
Definition: socket.h:25
No error.
Definition: socket.h:24
SOCK_ERROR Socket_SeekAsync(UID id, uint64_t offset, int whence)
Request an asynchronous seek of the socket.
Definition: socket.c:61
SOCK_FEATURES
Socket features.
Definition: socket.h:34
Send notification on read.
Definition: socket.h:49
Sock_ReadAsync read
The maximum number of connections allowed to the socket.
Definition: socket.h:62
SOCK_ERROR Socket_Create(const char *name, SocketDesc *desc)
Create a new Socket and register it to the kernel.
Definition: socket.c:7
uint32_t max_connections
The size of the struct, must be sizeof(SocketDesc)
Definition: socket.h:60
SOCK_NOTIFICATIONS
Socket notifications.
Definition: socket.h:45
Send notification on write.
Definition: socket.h:48
Send notification on connect.
Definition: socket.h:51
uint32_t(* Sock_WriteAsync)(uint8_t *src_buf, uint32_t size)
A pointer to a function that asynchronously performs a Socket write.
Definition: socket.h:19
The calling thread doesn't have the permissions.
Definition: socket.h:27
Send notification on disconnect.
Definition: socket.h:52
The socket already exists.
Definition: socket.h:29
SOCK_FEATURES flags
Function to seek the socket.
Definition: socket.h:66
Sock_SeekAsync seek
Function to write to the socket.
Definition: socket.h:64
There are no free connections on this socket.
Definition: socket.h:26