lib_xtcp quessions

Technical questions regarding the XTC tools and programming with XMOS.
goodfeather
Member++
Posts: 23
Joined: Wed Mar 30, 2016 11:10 am

lib_xtcp quessions

Post by goodfeather »

Dear Sirs,
When reading lib_xtcp source code, two questions trouble me:
1. In several places (such as xtcpd_service_client0(), xtcp_queue_event() of xtcp_server.xc), the xtcp_server will perform outct(xtcp, XS1_CT_END) and will wait for XS1_CT_END token in xtcpd_service_client0(). But I can not find where the xtcp client side will input this token and feedback.
How does it work?

2. xtcp_server performs outuint() to send conn data and xtcp client performs ":>" to get conn data. Can the two input-output modes work together?

Thanks
peter
XCore Addict
Posts: 230
Joined: Wed Mar 10, 2010 12:46 pm

Post by peter »

Hi goodfeather,

A channel has no hardware-defined communication protocol other than the fact that a connection is established when data is sent and the connection is closed when an END control token is sent.

Streaming channels are channels where the link is kept open and the compiler does not add anything to what is sent by the user.

Otherwise, channels have a protocol that means that outputs on one side are synchronised with inputs on the other side. It is possible to mimic this protocol by hand (as lib_xtcp is doing) but it is not recommended and could result in issues in the future if the low-level protocol over channels is changed.

Regards,

Peter