Mercurial
comparison gara/main.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 | ac8626c7859c |
| children | 19cccf6e866a |
comparison
equal
deleted
inserted
replaced
| 65:ecb6ee6a22c3 | 66:a0f0ad5e42eb |
|---|---|
| 1 #include "seobeo/seobeo.h" | 1 #include "seobeo/seobeo.h" |
| 2 #include "stdio.h" | 2 #include "stdio.h" |
| 3 | 3 |
| 4 void HandleClientRequest(Seobeo_PHandle p_cli_handle) { | 4 void HandleClientRequest(Seobeo_Handle *p_cli_handle) { |
| 5 char *hello = "Hello good sir"; | 5 char *hello = "Hello good sir"; |
| 6 Seobeo_Handle_Queue(p_cli_handle, (uint8_t*)hello, 14); | 6 Seobeo_Handle_Queue(p_cli_handle, (uint8_t*)hello, 14); |
| 7 Seobeo_Handle_Flush(p_cli_handle); | 7 Seobeo_Handle_Flush(p_cli_handle); |
| 8 | 8 |
| 9 while (1) | 9 while (1) |
| 20 int main() | 20 int main() |
| 21 { | 21 { |
| 22 | 22 |
| 23 printf("Server initializing\n"); | 23 printf("Server initializing\n"); |
| 24 const char *PORT = "3322"; | 24 const char *PORT = "3322"; |
| 25 Seobeo_PHandle server = Seobeo_Stream_Handle_Server_Create(NULL, PORT); | 25 Seobeo_Handle *server = Seobeo_Stream_Handle_Server_Create(NULL, PORT); |
| 26 | 26 |
| 27 printf("Server running\n"); | 27 printf("Server running\n"); |
| 28 while (1) | 28 while (1) |
| 29 { | 29 { |
| 30 Seobeo_PHandle p_cli_handle = | 30 Seobeo_Handle *p_cli_handle = |
| 31 Seobeo_Stream_Handle_Server_Accept(server); | 31 Seobeo_Stream_Handle_Server_Accept(server); |
| 32 if (!p_cli_handle) continue; | 32 if (!p_cli_handle) continue; |
| 33 | 33 |
| 34 if (fork() == 0) | 34 if (fork() == 0) |
| 35 { | 35 { |