LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to read bytes at port in TCP/IP communication

Hiii

 

I am having 1 doubt in visa we knows bytes at port by using the property node...

 

but for TCP/IP how should i get  bytes at port .... i want to read how many bytes are available in that port.....

 

 

can any 1 suggest answer...... 

0 Kudos
Message 1 of 3
(4,234 Views)

Would you please explain why you need this?

I always use TCP Read instead of VISA Read for TCP/IP communications. If you send a package, you can first send the length of the package and then the package itself. If you read you read first 2 or 4 bytes, where the length of following package is, and than the whole package.

It works fine.

0 Kudos
Message 2 of 3
(4,223 Views)

I can see why knowing how many bytes are available would be quite useful. Would prevent having to do what you're suggesting (which is the typical solution), or to have a Read with a really short timeout and a software buffer (and ignoring the expected timeout from the read).

 

Alas, it's not possible.

0 Kudos
Message 3 of 3
(4,207 Views)