add http.cm and probe

This commit is contained in:
2026-02-24 21:04:03 -06:00
parent 3d4c0ec3d3
commit 2b877e6b0c
11 changed files with 846 additions and 7 deletions

View File

@@ -859,6 +859,14 @@ typedef struct letter {
};
} letter;
/* I/O watch entry — one per watched file descriptor */
typedef struct {
int fd;
short events; /* POLLIN, POLLOUT */
JSContext *actor;
JSValue callback;
} io_watch;
/* Actor state machine constants */
#define ACTOR_IDLE 0
#define ACTOR_READY 1
@@ -1049,6 +1057,10 @@ void enqueue_actor_priority(JSContext *actor);
void actor_clock(JSContext *actor, JSValue fn);
uint32_t actor_delay(JSContext *actor, JSValue fn, double seconds);
JSValue actor_remove_timer(JSContext *actor, uint32_t timer_id);
void actor_watch(JSContext *actor, int fd, short events, JSValue fn);
void actor_watch_readable(JSContext *actor, int fd, JSValue fn);
void actor_watch_writable(JSContext *actor, int fd, JSValue fn);
void actor_unwatch(JSContext *actor, int fd);
void exit_handler(void);
void actor_loop(void);
void actor_initialize(void);