Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/kafkagosaur/net/connection.ts>Connection

Kafka client for Deno binding to kafka-go using WebAssembly
Latest
interface Connection
import { type Connection } from "https://deno.land/x/kafkagosaur@v0.0.6/net/connection.ts";

A generic stream-oriented network connection, equivalent to a Go net.Conn.

Properties

readonly
localAddr: Address

Returns the local network address.

readonly
remoteAddr: Address

Returns the remote network address.

Methods

read(bytes: Uint8Array): Promise<number | null>

Read reads data from the connection. Read can be made to time out and return an error after a fixed time limit; see SetDeadline and SetReadDeadline.

write(bytes: Uint8Array): Promise<number>

Write writes data to the connection. Write can be made to time out and return an error after a fixed time limit; see SetDeadline and SetWriteDeadline.

close(): Promise<void>
setReadDeadline(timeMs: number): void
setWriteDeadline(timeMs: number): void