DenoSocketServer
Native Deno TCP and Unix socket servers for Effect's unstable socket server API.
The plain make and layer names intentionally differ from DenoSocket.makeTcp and DenoSocket.layerTcp because this module has only one server kind. Deno has no standalone WebSocket server, so WebSocket constructors are omitted, and there is no IncomingMessage analogue. Connections made before run starts remain in the kernel backlog instead of being accepted and buffered as they are by the Node implementation. A second concurrent run waits for the first because listener access is guarded by a semaphore.
Deno-native TLS server constructors are included even though the Node socket server has no corresponding dedicated constructors. TLS is deliberately not tested here because the repository has no certificate fixture.
Constructors
Signature
declare const make: ( options: ListenOptions,) => Effect.Effect< SocketServer.SocketServer["Service"], SocketServer.SocketServerError, Scope.Scope>;Creates a scoped TLS socket server using a native Deno TLS listener.
Signature
declare const makeTls: ( options: TlsListenOptions,) => Effect.Effect< SocketServer.SocketServer["Service"], SocketServer.SocketServerError, Scope.Scope>;Layers
Provides a socket server using a scoped native Deno TCP or Unix listener.
Signature
declare const layer: ( options: ListenOptions,) => Layer.Layer<SocketServer.SocketServer, SocketServer.SocketServerError>;Provides a TLS socket server using a scoped native Deno TLS listener.
Signature
declare const layerTls: ( options: TlsListenOptions,) => Layer.Layer<SocketServer.SocketServer, SocketServer.SocketServerError>;Models
ListenOptions type
Native Deno options for listening on a TCP or Unix socket.
Signature
type ListenOptions = | (Deno.TcpListenOptions & { transport?: "tcp"; }) | (Deno.UnixListenOptions & { transport: "unix"; });TlsListenOptions type
Native Deno options and certified key material for listening with TLS.
Signature
type TlsListenOptions = Deno.ListenTlsOptions & Deno.TlsCertifiedKeyPem;
Creates a scoped socket server using a native Deno TCP or Unix listener.