view gara/main.c @ 278:8d560f50ed4c

Improve infinite canvas interactions and browser chrome Render Lucide icons directly with Raylib, add searchable icon browsing, robust text editing, entity lifecycle animations, z-order-safe input, semantic themes, and animated editable browser controls. Document rendering, pinning, context, and component extension for future agents. Co-authored-by: Copilot <[email protected]> Copilot-Session: f68442b1-fa8f-46a0-9689-81710613bbd4
author MrJuneJune <me@mrjunejune.com>
date Mon, 17 Aug 2026 22:16:14 -0700
parents 19cccf6e866a
children
line wrap: on
line source

#include "seobeo/seobeo.h"
#include "stdio.h"

void HandleClientRequest(Seobeo_Handle *p_cli_handle)
{
  char *hello = "Hello good sir";
  Seobeo_Handle_Queue(p_cli_handle, (uint8_t*)hello, 14);
  Seobeo_Handle_Flush(p_cli_handle);

  while (1)
  {
    int n = Seobeo_Handle_Read(p_cli_handle);
    if (n > 0) 
    {
      printf(p_cli_handle->read_buffer);
      Seobeo_Handle_Consume(p_cli_handle, n);
    }
  }
}

int main()
{

  printf("Server initializing\n");
  const char *PORT = "3322";
  Seobeo_Handle *server = Seobeo_Stream_Handle_Server_Create(NULL,  PORT);

  printf("Server running\n");
  while (1)
  {
    Seobeo_Handle *p_cli_handle =
      Seobeo_Stream_Handle_Server_Accept(server);
    if (!p_cli_handle) continue;

    if (fork() == 0)
    {
      HandleClientRequest(p_cli_handle);
      _exit(0);
    }
  }

  return 0;
}