listen

listen();

The listen method of the JadeSerialPort class listens for a remote application to connect to JADE and returns when a connection is established. You can call the listen method only when the state property is Disconnected (0). The state property changes to Connected (2) when the listen method completes.

The code fragment in the following example sets the connection to listen to the current port, sets the status bar to read connected, and fills the text box with the name information if a connection is made.

self.connection.listen;
if self.connection.state = Connection.Connected then
    statusLine1.caption := "Connected";
    textBox.text        := self.connection.name;
endif;
...

See also the Connection class timeout property.