Network/* structure changed

This commit is contained in:
2022-08-13 00:53:30 +06:00
parent d96bebaf45
commit 4e162bd474
11 changed files with 220 additions and 108 deletions

View File

@@ -22,8 +22,16 @@ void test_network(){
printf("\e[96m------------[test_network]------------\n");
if(sizeof(knIPV4Endpoint)!=sizeof(knPort)+sizeof(knIPV4Address))
throw(ERR_WRONGTYPE);
test_knIPV4Address_fromStr(127,0,0,1);
test_knIPV4Address_fromStr(34,255,45,0);
test_knIPV4Address_fromStr(3,3,3,128);
knSocket* s;
tryLast(knSocket_open(knSockType_TCP), maybeS)
s=maybeS.value.VoidPtr;
printf("\e[92mTCP socket created\n");
tryLast(knSocket_close(s);,_);
printf("\e[92mTCP socket closed\n");
}));
}