Forum Discussion
Altera_Forum
Honored Contributor
21 years agoLWIP socket creation issue
LWIP socket creation issue I currently have implemented an algorithm that allows two separate devices (using the same code) to create and maintain a socket that goes something like: TaskA...
Altera_Forum
Honored Contributor
21 years ago>Are all the previous sockets which have been created being closed, or are you just running >out of resources?
The socket is being closed each time after an attempted connection i.e. task A is shutdown the socted if Task B failed to make an out going connection or failed to accept an incoming connection. I am using the close() and have also tried shutdown() (which currently just implements close()). So each time a socket is created it is closed before the next attempt to create another. >Which call are you using to create the new tasks? I believe you can't really use the >"sys_thread_new" function to create threads which are subsequently terminated. I am currently using: sys_thread_new() to create task A (which is always active) and OSTaskCreateExt() to create task B from task A (I am using OSTaskDel() to delete task B from task A) Aiden