- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how to know the tcp socket client broken in nichestack/ucos 2,
I want to accept the server socket again after the tcp socket client is broken. my project is : I make a tcp socket server for sending data to tcp client only. when the tcp client is broken (normally, whatever), or so when the client connect again, the link is not work. I think is: the tcp server task is not quite the while(1) loop, and not accept again ! or other problem? thanks for your help. my code just like following: tcpserversocketTask() { //define local variable socket(AF_INET,SOCKET_STREAM,0); bind(); listen(); accept(); while(1) { read a flag from a ram ,when the condition(flag) is true send some data to tcp client. TK_SLEEP(1); }Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
have you found any solution?
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page