Initializer
init(establishedChannel:username:password:database:)
Create a configuration for establishing a connection to a Postgres server over a preestablished
NIOCore/Channel.init(establishedChannel channel: any Channel, username: String, password: String?, database: String?)
Parameters
channelThe
NIOCore/Channelto use. The channel must already be active and connected to an endpoint (i.e.NIOCore/Channel/isActivemust betrue).usernameThe username to authenticate with.
passwordThe password to authenticate with.
databaseThe database to open. If
nil, the client connects to the server’s default database.
Discussion
This is provided for calling code which wants to manage the underlying connection transport on its own, such as when tunneling a connection through SSH.