mysql-native v3.0.0

API Reference Home: [This Version] [Latest Version] [Other Versions]


Function Connection.reconnect

Reconnects to the server using the same connection settings originally used to create the Connection.

void reconnect();

void reconnect (
  SvrCapFlags clientCapabilities
);

Optionally takes a SvrCapFlags, allowing you to reconnect using a different set of server capability flags.

Normally, if the connection is already open, this will do nothing. However, if you request a different set of SvrCapFlags then was originally used to create the Connection, the connection will be closed and then reconnected using the new SvrCapFlags.