server & client test
This commit is contained in:
parent
e1dae22cbf
commit
96d938286e
1 changed files with 6 additions and 0 deletions
|
@ -152,6 +152,12 @@ int server_init(Server* srv, unsigned short Port, unsigned int dwMaxConnections)
|
|||
srv->ConnectionsAddr =(struct sockaddr_in*) kmalloc(sizeof(struct sockaddr_in)*dwMaxConnections);
|
||||
srv->bThreads = (tid_t*)kmalloc(sizeof(tid_t)*dwMaxConnections);
|
||||
|
||||
if (!srv->sConnections || !srv->ConnectionsAddr || !srv->bThreads)
|
||||
{
|
||||
kprintf("low on mem");
|
||||
return -1;
|
||||
}
|
||||
|
||||
srv->dwMaximumConnections=dwMaxConnections;
|
||||
|
||||
memset(srv->sConnections,0xFF,sizeof(SOCKET)*dwMaxConnections);
|
||||
|
|
Loading…
Add table
Reference in a new issue