Virtual serial ports emulator project |
If connection is lost it will reconnect automatically. Also you can specify read data timeout (in seconds) to automatically reconnect Tcp client. Optionally, COM port can be read-only or write-only.
This device does not create virtual serial port. It uses existing one that can be either physical or virtual (for example, Connector).
Step 1
Step 2
-- connect handler function this.TcpClientConnected(this, context) this:SendString(context, "==> Login") end -- disconnecting handler (connection is still alive) function this.TcpClientDisconnecting(this, context) this:SendString(context, "==> Logout") end -- disconnect handler (connection is already broken) function this.TcpClientDisconnected(this, context) return end