void close()

Closes the port.

After a call to this method any incoming message is silently dropped.

Source

void close();