A class that implements the server-side logic for handling client and incoming connections. This server manages multiple client connections, processes messages, and forwards data between clients and applications.

  • Supports subdomains for client connections.
  • Handles connections to and from applications (app1 and app2).
  • Implements data forwarding and queue management for reliable communication.

Constructors

  • Initializes a new instance of the Server class.

    Parameters

    • clientPort: number

      The port for client connections.

    • incomingPort: number

      The port for incoming app1 connections.

    • hostClient: string

      The host address for client connections.

    • hostIncoming: string

      The host address for incoming app1 connections.

    Returns Server

Properties

clientPort: number

The port for client connections.

hostClient: string

The host address for client connections.

hostIncoming: string

The host address for incoming app1 connections.

incomingPort: number

The port for incoming app1 connections.

Methods

  • Creates and starts the client server for handling client connections.

    Parameters

    • port: number

      The port for the client server.

    • host: string

      The host address for the client server.

    Returns void

  • Creates and starts the incoming server for handling app1 connections.

    Parameters

    • port: number

      The port for the incoming server.

    • host: string

      The host address for the incoming server.

    Returns void