Mercurial
diff seobeo/s_linux_network.c @ 66:a0f0ad5e42eb
[Misc] taking out capital P stuff.
| author | June Park <parkjune1995@gmail.com> |
|---|---|
| date | Wed, 24 Dec 2025 06:34:19 -0800 |
| parents | ea9ef388ab97 |
| children | 6626ec933933 |
line wrap: on
line diff
--- a/seobeo/s_linux_network.c Wed Dec 24 06:22:59 2025 -0800 +++ b/seobeo/s_linux_network.c Wed Dec 24 06:34:19 2025 -0800 @@ -1,9 +1,9 @@ #include "seobeo/seobeo.h" -Seobeo_PHandle Seobeo_Stream_Handle_Server_Create(const char *host, const char* port) +Seobeo_Handle *Seobeo_Stream_Handle_Server_Create(const char *host, const char* port) { - Seobeo_PHandle p_handle; + Seobeo_Handle *p_handle; struct addrinfo hints, *server_infos, *free_server_info; int32 socket_fd, yes = 1; // Need this for setsockopt @@ -79,9 +79,9 @@ } -Seobeo_PHandle Seobeo_Stream_Handle_Client_Create(const char *host, const char* port, boolean use_tls) +Seobeo_Handle *Seobeo_Stream_Handle_Client_Create(const char *host, const char* port, boolean use_tls) { - Seobeo_PHandle p_handle; + Seobeo_Handle *p_handle; p_handle = malloc(sizeof(*p_handle)); struct addrinfo hints, *server_infos; @@ -148,7 +148,7 @@ return p_handle; } -Seobeo_PHandle Seobeo_Stream_Handle_Server_Accept(Seobeo_PHandle p_server_handle) +Seobeo_Handle *Seobeo_Stream_Handle_Server_Accept(Seobeo_Handle *p_server_handle) { struct sockaddr_storage addr; socklen_t addrlen = sizeof addr; @@ -168,7 +168,7 @@ if (flags == -1) return NULL; fcntl(client_fd, F_SETFL, flags | O_NONBLOCK); - Seobeo_PHandle p_client_handle = malloc(sizeof *p_client_handle); + Seobeo_Handle *p_client_handle = malloc(sizeof *p_client_handle); p_client_handle->socket = client_fd; p_client_handle->type = SEOBEO_STREAM_TYPE_CLIENT; @@ -198,7 +198,7 @@ return p_client_handle; } -void Seobeo_Handle_Destroy(Seobeo_PHandle p_handle) +void Seobeo_Handle_Destroy(Seobeo_Handle *p_handle) { if (!p_handle) return; @@ -237,7 +237,7 @@ } -int32 Seobeo_Handle_Flush(Seobeo_PHandle p_handle) +int32 Seobeo_Handle_Flush(Seobeo_Handle *p_handle) { uint32 total = p_handle->write_buffer_len; uint32 sent = 0; @@ -282,7 +282,7 @@ return 0; } -int32 Seobeo_Handle_Queue(Seobeo_PHandle p_handle, const uint8 *data, uint32 data_size) +int32 Seobeo_Handle_Queue(Seobeo_Handle *p_handle, const uint8 *data, uint32 data_size) { if (p_handle->write_buffer_len + data_size > p_handle->write_buffer_capacity) { @@ -352,7 +352,7 @@ return 0; } -int32 Seobeo_Handle_Read(Seobeo_PHandle p_handle) +int32 Seobeo_Handle_Read(Seobeo_Handle *p_handle) { int32 read_size; if (!p_handle) return -1; @@ -397,7 +397,7 @@ return read_size; } -void Seobeo_Handle_Consume(Seobeo_PHandle p_handle, uint32 consumed) +void Seobeo_Handle_Consume(Seobeo_Handle *p_handle, uint32 consumed) { if (consumed >= p_handle->read_buffer_len) {