Does RTCS_select Implement Write-ability Activity Check?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Does RTCS_select Implement Write-ability Activity Check?

1,218 次查看
pmt
Contributor V

The RTCS documentation concerning RTCS_select/RTCS_selectall seems a little out of date, and in browsing the code it's not clear to me what is fully implemented. 

My question is does RTCS_Select, in addition to connection activity, errors, and data ready to read, also test for write_set?  That is will it unblock when a socket buffer is available to take more data on a write?  This is needed for handlers that need to both read and write data on a socket within a single tasks.

Thanks,

PMT

标签 (1)
标记 (3)
0 项奖励
回复
2 回复数

906 次查看
Martin_
NXP Employee
NXP Employee

RTCS_selectset() returns also when a send buffer for a stream socket becomes available (writeable) after acknowledge is received. I recommend RTCS_selectset() as RTCS_selectall() has a bug (it will be fixed in next MQX).

By the way, next year we will introduce also select on independent socket sets for read/write, BSD-like select() function.

0 项奖励
回复

906 次查看
danieldelatorre
Contributor IV

So it has been over a year, is this ever going to be implemented?  I have had to hack mqx rtos code to have a select-like function for unblocking on uart reads.  I had to do this on 2 different products and would be nice if I didn't have to include this hack when I update to the latest MQX rtos.  At the moment I have a tcp server thread that I would like to have close sockets when the child socket thread gets a disconnection event although I can't seem to find a way to unblock the server thread when it is stuck on RTCS_selectset.  I could use the timeout on the rtcs_select although I don't want it to have to poll... 

0 项奖励
回复