Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/alosaur/src/microservice/mod.ts>MsTcpClient

Alosaur - Deno web framework with many decorators
Go to Latest
class MsTcpClient
import { MsTcpClient } from "https://deno.land/x/alosaur@v0.35.0/src/microservice/mod.ts";

TCP microservice client with lazy connect to service

Constructors

new
MsTcpClient(options: Deno.ConnectOptions)

Creates instance

Properties

private
optional
_connect: Deno.Conn
private
readonly
decoder: TextDecoder
private
readonly
delimiter: string
private
readonly
encoder: TextEncoder
private
readonly
endOfMessage: string

Methods

private
connect(): Promise<Deno.Conn>
emit(event: string, payload: any)

Emit publish event

send(pattern: Object, payload: any)

Send pattern request