attempt at loopback only network test
Rosimildo daSilva
rdasilva at connecttel.com
Fri Jan 4 19:46:39 UTC 2002
From: Joel Sherrill <joel.sherrill at OARcorp.com>
To: rtems-users at OARcorp.com <rtems-users at OARcorp.com>
Date: Friday, January 04, 2002 1:33 PM
Subject: attempt at loopback only network test
>So if anyone could figure out what is wrong with the attached
>code, it would sure be appreciated. I expect it will result
>in someone teaching me network programming basics. :)
This test is trying to connect to a port that nobody is listening on it.
The flow should be:
main()
{
- Create a server task to listen and accept connections.
- wait task above to run.
- create client socket
- bind it.
- connect.
- write/ read
- close
}
void server_task()
{
- create socket
- make it to listen
while( true )
{
int soc = accept( ..... );
- read/write
- close
}
}
Hope this help. :-)
Rosimildo.
More information about the users
mailing list