Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
公告
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 讨论

how to know the tcp socket client broken in nichestack/ucos 2

Altera_Forum
名誉分销商 II
1,245 次查看

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); 

}
0 项奖励
1 回复
Altera_Forum
名誉分销商 II
503 次查看

have you found any solution?

0 项奖励
回复