benchmark

This commit is contained in:
Carl-Benedikt Krüger 2011-07-05 12:53:10 +02:00
parent ed4f9605e0
commit 65288e71cc

View file

@ -195,7 +195,7 @@ void* server_task(void* e)
/* If connection is established then start communicating */
memset(buffer,0,256);
kprintf("recieving");
n = read( newsockfd,buffer,255 );
n = recv( newsockfd,buffer,255,0 );
if (n < 0)
{
kprintf("ERROR reading from socket");
@ -205,7 +205,7 @@ void* server_task(void* e)
/* Write a response to the client */
kprintf("writing");
n = write(newsockfd,"I got your message",18);
n = send(newsockfd,"I got your message",18,0);
if (n < 0)
{
kprintf("ERROR writing to socket");
@ -215,7 +215,7 @@ void* server_task(void* e)
tmp1 = get_clock_tick();
for (n = 0; n < 1024*1024*100/256 ; n++)
send(newsockfd,buffer,sizeof(buffer));
send(newsockfd,buffer,sizeof(buffer),0);
tmp2 = get_clock_tick();
@ -269,6 +269,9 @@ void* client_task(void* e)
/* spew-out the results and bail out of here! */
kprintf("%s\n", dir);
for (n = 0; n < 1024*1024*100/256 ; n++)
recv(sd,dir,sizeof(dir),0);
close(sd);
return NULL;