server & client test
This commit is contained in:
parent
58f89e225c
commit
5816fafa47
1 changed files with 6 additions and 0 deletions
|
@ -166,6 +166,11 @@ void srv_on_disc(ServerEventArgs*e )
|
|||
kprintf("connection lost!!!\n");
|
||||
}
|
||||
|
||||
void srv_on_conn(ServerEventArgs* e)
|
||||
{
|
||||
kprintf("someone finally connected\n");
|
||||
}
|
||||
|
||||
|
||||
void* server_task(void* e)
|
||||
{
|
||||
|
@ -180,6 +185,7 @@ void* server_task(void* e)
|
|||
kprintf("created server");
|
||||
srv._OnRead = srv_on_read;
|
||||
srv._OnDisconnect = srv_on_disc;
|
||||
srv._OnConnect = srv_on_conn;
|
||||
sleep(2);
|
||||
srv_sendBuffer(&srv,0,"Hello you!",sizeof("Hello you!"));
|
||||
sleep(1);
|
||||
|
|
Loading…
Add table
Reference in a new issue