Handles tcp tunnels and maintains a list of connections

Hierarchy

  • TCPServer

Constructors

  • creates a tcp server on port from server config and registers passed in ids with their corresponding bot tunnels

    when a robot connects, bind it to the server

    Parameters

    • connections: {
          [id: string]: BotTunnel;
      } = {}

      bot connections in a id:BotTunnel array

    Returns TCPServer

Properties

connections: {
    [id: string]: BotTunnel;
} = {}

bot connections in a id:BotTunnel array

Type declaration

server: Server

Methods

  • When a robot connects, add the tunnel to the robot connections at its id

    assign a random id to new robots

    Parameters

    • socket: Socket

      the incoming connection socket information

    Returns void

Generated using TypeDoc