Make socket port binding a separate step with ipc_netsockbindport() syscall
This commit is contained in:
@ -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, ); */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user