Programming with Reflection

image\rwnprg32.gif Disconnect method

 

Syntax object.Disconnect

 

Description

Disconnects the current connection and closes the port. This method does not change the value of the connection type (determined by the ConnectionType property) or connection settings (determined by the ConnectionSettings property). A subsequent call to Connect, therefore, reconnects to the most recently established connection.

By default, when you close a serial connection —no matter whether you close it using the Disconnect method or the Disconnect command on the Connection menu, or by quitting Reflection—the DTR (data terminal ready) signal is also dropped. In some cases, particularly with modem connections, you may want the DTR signal to remain true even after disconnecting or quitting Reflection; this prevents the modem from hanging up and lets you return to your Reflection session and resume your connection. To avoid dropping the DTR signal when disconnecting, set the ConnectionSettings keyword DropDTROnDisconnect to False.

 

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command