Papang Posted September 25, 2010 Report Share Posted September 25, 2010 Hi Lavas, I was creates 2 TCP programs, client andserver. Client side is open connection and there aretwo functions provided, first are receive the image from the server and second aresend request of Boolean to the server. Server side is listen connection and there arealso two functions provided, first are send the image to the client and secondare receive request of Boolean from the client. My questions are: Can I combine those two functions into one lineTCP connection (because my current programs at two lines TCP connection) and putit into case structure so I can play the connections several time duringprogram running? I was try but it no works and some errors comeout so I make it back to standard. Hope anyone can help me.. Thank you. Client.vi Server.vi Quote Link to comment
ShaunR Posted September 26, 2010 Report Share Posted September 26, 2010 (edited) Take a look at Data Client.vi and Data Server.vi in the NI examples. It uses 1 channel. The client sends back the letter Q to the server (on the same connection) to stop the server sending data. Oh. And you can get the IP address by using "IpTostr" and "StrToIP" instead of executing IPconfig and formatting the result. (I'd post a picture, but for some reason image uploading is failing) Edited September 26, 2010 by ShaunR 1 Quote Link to comment
ShaunR Posted September 26, 2010 Report Share Posted September 26, 2010 Take a look at Data Client.vi and Data Server.vi in the NI examples. It uses 1 channel. The client sends back the letter Q to the server (on the same connection) to stop the server sending data. Oh. And you can get the IP address by using "IpTostr" and "StrToIP" instead of executing IPconfig and formatting the result. (I'd post a picture, but for some reason image uploading is failing) Weird. Upload fails if I change from quick to full edit. But straight reply is fine. 1 Quote Link to comment
jgcode Posted September 26, 2010 Report Share Posted September 26, 2010 Weird. Upload fails if I change from quick to full edit. But straight reply is fine. This was a question at NI Week 2010 Coding Challenge. You should have entered! Quote Link to comment
ShaunR Posted September 26, 2010 Report Share Posted September 26, 2010 This was a question at NI Week 2010 Coding Challenge. You should have entered! If it was in Oz I probably would have Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.