- This program involves a TCP open connection node, two TCP write nodes, and a TCP close connection node
- All timeout values are set to -1 so it doesn't timeout
- The TCP open connection node is initialized with a PORT value
- The error and the connection are passed into the while loop, which iterates once per second
- Inside the loop, the program first attempts to receive a packet that is 1 byte in size (4 bits, 0-15)
- First, the thermometer data is converted to a string
- the length of the string is then converted to a string and is sent out preliminarily
- The thermometer string data is then sent out on the port
- This continues until the stop is called, at which time the connection is closed and any error is passed
- This program involves a TCP Listener node, two TCP read nodes, and a TCP close connection node
- All timeout values are set to -1 so it doesn't timeout
- The TCP listener node is initialized with a PORT value and with a blank string converted to an ip, which returns the local machine ip.
- The error and the connection are passed into the while loop, which iterates once per second
- Inside the loop, the program first attempts to receive a packet that is 1 byte in size (4 bits, 0-15)
- After the length data is received, the length is converted to an int and passed to the next receive node where the actual data is received
- The String is converted to a number and the thermometer is set to the value
- This continues until the stop is called, at which time the connection is closed and any error is passed