Documentation

v2.1.0Last updated: January 12, 2026

Xeno Tech Documentation

Welcome to Xeno Tech. We build open source tools for the future - from VR networking systems to custom Linux distributions. This documentation covers our main projects and how to use them.

Link Stream Installation

Install Link Stream via npm or yarn:

bash
npm install @xeno-tech/link-stream

Or with yarn:

bash
yarn add @xeno-tech/link-stream

Quick Start

Client Setup

typescript
import { LinkStreamClient } from '@xeno-tech/link-stream'

// Create a new client
const client = new LinkStreamClient({
  autoReconnect: true,
  reconnectInterval: 3000,
  maxRetries: 5
})

// Connect to server
await client.connect('wss://your-server.com')

// Join a room
const room = await client.joinRoom('my-game-room')

// Listen for messages
client.on('message', (message) => {
  console.log('Received:', message)
})

// Send a message
client.send({
  type: 'player-position',
  payload: { x: 10, y: 5, z: 3 }
})

Server Setup

typescript
import { LinkStreamServer } from '@xeno-tech/link-stream'

// Create server
const server = new LinkStreamServer({
  maxRooms: 100,
  maxPeersPerRoom: 50,
  heartbeatInterval: 30000
})

// Start server
server.start(8080)

// Create a room
const room = server.createRoom({
  id: 'lobby',
  name: 'Main Lobby',
  maxPeers: 50
})

// Handle events
server.on('peer-joined', (peer, room) => {
  console.log(`${peer.name} joined ${room.name}`)
  
  // Broadcast to room
  server.broadcast(room.id, {
    type: 'peer-joined',
    payload: peer
  })
})

LinkStreamClient API

Constructor Options

OptionTypeDefaultDescription
autoReconnectbooleantrueAutomatically reconnect on disconnect
reconnectIntervalnumber3000Ms between reconnection attempts
maxRetriesnumber5Maximum reconnection attempts

Methods

  • connect(serverUrl: string): Promise<void> - Connect to server
  • joinRoom(roomId: string): Promise<Room> - Join a room
  • leaveRoom(): Promise<void> - Leave current room
  • send(message: Message): void - Send message to room
  • disconnect(): void - Disconnect from server

Download Link Stream

Download the latest version of Link Stream:

Contributing

We welcome contributions! Please see our GitHub repositories for contribution guidelines. You can also join our community to connect with other developers.