Hello Experts,
Currently I am using a
Java program to read data from a machine that is connected through a Serial Port.
The purpose of this machine is to send data at irregular intervals over serial port.
In Java program I have implemented SerialPortEventListener where I am calling serialEvent(SerialPortEvent event) to read data from machine.
Whenever, machine sends data at irregular intervals, my Java code is able to listen to that event and data is read successfully.
Now client wish to purchase a new machine which will communicate data only over TCP/IP port.
I have already goggled this and have understood how to read data over TCP/IP port using sockets in Java.
However challenge that comes in my mind is reading data from machine at irregular intervals.
Like in serial port this is automatically done using serialEvent function as this function is automatically triggered on incoming data, BUT how is this possible in TCP/IP ?