sockets: send

This commit is contained in:
Matheus
2022-10-18 12:45:16 -03:00
parent 86ff503191
commit b9e1f85486
5 changed files with 69 additions and 2 deletions
+2 -1
View File
@@ -28,6 +28,7 @@ typedef struct _socket_t{
struct _socket_t** backlog;
event_t connectevent; // when the socket is listening and this is fired, someone used connect() on the socket
event_t acceptevent; // when a socket is waiting for a connection to be accepted, it sleeps on this
event_t dataevent; // fired when data is written to/read from the ring buffer
int state;
union {
sockaddr_un addr_un;
@@ -63,5 +64,5 @@ int socket_new(socket_t** returnptr, int family, int type, int protocol);
int socket_bind(struct _socket_t* sock, void* addr, size_t addrlen);
int socket_listen(struct _socket_t* sock, int backlog);
int socket_accept(socket_t** peer, socket_t* sock, void* addr, size_t* addrlen);
int socket_send(socket_t* socket, void* buff, size_t len, int flags, int* error);
#endif
+1 -1
View File
@@ -12,5 +12,5 @@ struct _socket_t;
int unsocket_new(struct _socket_t** returnptr, int type, int protocol);
int unsocket_bind(struct _socket_t* sock, sockaddr_un* addr, size_t addrlen);
int unsocket_send(struct _socket_t* socket, void* buff, size_t len, int flags, int* error);
#endif