SqlServerSocketAdapter
class in package klyn.databases.sql.sqlserver

    public class SqlServerSocketAdapter:

SqlServerSocketAdapter

Socket adapter for SQL Server TDS protocol.

Wraps a standard Socket and provides TDS-specific read/write operations.

    import klyn.databases.sql.sqlserver

    tcp = Socket()
    tcp.connect("localhost", 1433)
    adapter = SqlServerSocketAdapter(tcp)

Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | SqlServerSocketAdapter `SqlServerSocketAdapter(socket as Socket):` | No summary.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | close `close() as Void:` | Closes the socket.
public | flush `flush() as Void throws SQLException:` | Flushes the socket output (no-op for SQL Server as sendBytes is synchronous).
public | isSecure `isSecure() as Boolean:` | Returns true if the socket is using TLS.
public | read `read(buffer as Byte[], offset as Int, length as Int) as Int throws SQLException:` | Reads bytes from the socket.
public | setTimeoutMillis `setTimeoutMillis(timeoutMillis as Int) as Void throws SQLException:` | Sets the socket timeout.
public | upgrade `upgrade(host as String, port as Int, sslContext as SSLContext) as Void throws SQLException:` | Upgrades the socket to TLS/SSL.
public | write `write(buffer as Byte[], offset as Int, length as Int) as Void throws SQLException:` | Writes bytes to the socket.