socket

package
v4.0.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package socket provides a socket-based [relay.Relay] implementation for frame transport over TCP and Unix domain connections.

It wraps any io.ReadWriteCloser (typically a net.Conn) and uses pre-allocated buffer pools from the internal package to minimize allocations during frame reception.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Relay

type Relay struct {
	// contains filtered or unexported fields
}

Relay communicates with underlying process using sockets (TPC or Unix).

func NewSocketRelay

func NewSocketRelay(rwc io.ReadWriteCloser) *Relay

NewSocketRelay creates new socket based data relay.

func (*Relay) Close

func (rl *Relay) Close() error

Close the connection.

func (*Relay) Receive

func (rl *Relay) Receive(frame *frame.Frame) error

Receive data from the underlying process and returns associated prefix or error.

func (*Relay) Send

func (rl *Relay) Send(frame *frame.Frame) error

Send signed (prefixed) data to PHP process.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL