diff options
| author | Aargh Rai <aargh.rai+git@gmail.com> | 2026-05-27 17:13:14 +0530 |
|---|---|---|
| committer | Aargh Rai <aargh.rai+git@gmail.com> | 2026-05-27 17:13:14 +0530 |
| commit | 49cc88def2f9edea59e79ca37f41400ad870579e (patch) | |
| tree | 55d84a76920dd4af7a7a2054d553ce29d11e726c /src/main.c | |
| parent | 380d67bada7544f5f10cecc8c9dff7ed2f79e187 (diff) | |
went through all, but comms is working
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -1,8 +1,28 @@ #include <stdio.h> +#include <assert.h> #include "bitboard.h" #include "search.h" -int main() { +void comms_main(); +int direct_run(); + +int main(int argc, char** argv) { + if (argc == 1) return direct_run(); + assert(argc == 2); + comms_main(); + return 0; +} + +#include "ipc.h" +void comms_main() { + mqd_t tx = mq_open("/engine_to_server", O_WRONLY); + mqd_t rx = mq_open("/server_to_engine", O_RDONLY); + + char msg[] = "hello"; + mq_send(tx, msg, sizeof(msg), 0); +} + +int direct_run() { moves_t moves = moves_init(); position_t position = position_starting(); |
