Make socket port binding a separate step with ipc_netsockbindport() syscall

This commit is contained in:
2025-10-29 22:33:41 +01:00
parent 4417141216
commit d947192475
10 changed files with 54 additions and 15 deletions

View File

@ -5,7 +5,8 @@
#define MAX_CONNS 10
void diagdummy_tcptestserver(void) {
netsock_t netsock = ipc_netsockmake(NETSOCK_IPV4, NETSOCK_TCP, 1);
netsock_t netsock = ipc_netsockmake(NETSOCK_IPV4, NETSOCK_TCP);
ipc_netsockbindport(netsock, 1);
ipc_netsocklisten(netsock, MAX_CONNS);
for (;;) {
@ -21,5 +22,5 @@ void diagdummy_tcptestserver(void) {
}
void diagdummy_tcptestclient(void) {
/* netsock_t netsock = ipc_netsockmake(NETSOCK_IPV4, NETSOCK_TCP, ); */
}