| 程序包 | 说明 |
|---|---|
| com.heimuheimu.mysql.jdbc |
提供 Mysql 数据库的 JDBC 实现。
|
| com.heimuheimu.mysql.jdbc.net |
| 限定符和类型 | 方法和说明 |
|---|---|
SocketConfiguration |
ConnectionConfiguration.getSocketConfiguration()
Mysql 连接使用的 Socket 配置信息,可能返回
null |
| 构造器和说明 |
|---|
ConnectionConfiguration(java.lang.String host,
java.lang.String databaseName,
java.lang.String username,
java.lang.String password,
int characterId,
long capabilitiesFlags,
int pingPeriod,
SocketConfiguration socketConfiguration)
构造一个建立 Mysql 数据库连接使用的配置信息。
|
| 限定符和类型 | 字段和说明 |
|---|---|
static SocketConfiguration |
SocketConfiguration.DEFAULT
Socket 默认配置信息:
SocketOptions.SO_KEEPALIVE 值为 true
SocketOptions.SO_SNDBUF 值为 32 KB
SocketOptions.SO_RCVBUF 值为 32 KB
Socket 连接超时时间值为 30 秒
|
| 限定符和类型 | 方法和说明 |
|---|---|
static SocketConfiguration |
SocketBuilder.getConfig(java.net.Socket socket)
读取
Socket 配置信息,返回的配置信息中不包含 getConnectionTimeout() 配置项。 |
| 限定符和类型 | 方法和说明 |
|---|---|
static java.net.Socket |
SocketBuilder.create(java.lang.String hostname,
int port,
SocketConfiguration config)
|
static java.net.Socket |
SocketBuilder.create(java.lang.String host,
SocketConfiguration config)
根据目标主机地址(由主机名和端口组成,":" 符号分割,例如:localhost:4182) 创建一个
Socket 实例,
如果 config 为 null,将使用 DEFAULT 作为其配置信息。 |
static void |
SocketBuilder.setConfig(java.net.Socket socket,
SocketConfiguration config)
|
Copyright © 2019. All Rights Reserved.