Fixed an error in the accepting code (in rostcp.c line 576). tcp_accepted was being called for the wrong pcb. Instead of the pcb belonging to the listening socket it was being called for the pcb belonging to the newly created connection socket. In order to fix this I added an extra field to the tcp_pcb structure to hold a reference to the listening socket. This is a crude method and it will be replaced by something more elegant.
Right now however there's a slight nondeterminism regarding the connection. One it's established the message either gets through to the other side or not, randomly. This could be due to a race condition of some sorts.
Also another problem is that the server side brings down the system when closing.
svn path=/branches/GSoC_2011/TcpIpDriver/; revision=51889
- Rewrite most of the lower TCP layer code to work with lwIP
[LWIP]
- Write all of the implementation-specific code and headers
[TCPIP]
- Add assertions in the object reference functions
- Remove the completion queue hack
This is still isn't totally finished yet. There are still two main issues that need to be overcome: listen/accept don't work at all and the performance is horrible.
I hope that once I tune some of the options, I can get it to perform reasonably well. If any curious testers want to try this out, be my guest but realize that not
a lot of apps will work yet. Suggestions are welcome! :)
svn path=/branches/tcp-rewrite-branch/; revision=48840