In New MQX4.1, TCP/IP have not the RTCS_Select() ,RTCS_FD_SET function ,etc. I want to know why?and if I must communicate with multiple clients,how can I to do ?
have this Demo about this?
I think you can try the RTCS_selectset and RTCS_selectall in MQX4.1.1. There are two examples in C:\Freescale\Freescale_MQX_4_1\doc\rtcs\MQX_rtcs_user_guide, please check section 7.1.136 and 7.1.137
Have a nice day,Daniel
You can use RTCS_selectset() but I would not recommend it as it cannot distinguish between write and read activity as POSIX like select(). We consider this function as obsolete and recommend new applications to either use POSIX like select() or multi-task design.
We have introduced POSIX-like select() in last released versions of RTCS and (MQX 4.2.0 will be out very soon). However, even POSIX like select() is useful only for single task design. Example for the single task design with select() is the ECHOSRV application in RTCS 4.2.0. If you wish to have multi task desing, as we have for example in HTTPSRV, FTPSRV applications, you can just create separate task per connected client. In the per-client task you would recv()/send() with the client and then close the socket and destroy the task after communication is done. Exactly this way we do the sessions in HTTPSRV/FTPSRV.
thank you,Martin Latal and Daniel Chen,I will try it (试试),thank you!
Retrieving data ...