reflector.d.ts 683 B

1234567891011121314151617181920212223
  1. import type { Scene } from "../scene";
  2. /**
  3. * Class used to connect with the reflector zone of the sandbox via the reflector bridge
  4. * @since 5.0.0
  5. */
  6. export declare class Reflector {
  7. private static readonly _SERVER_PREFIX;
  8. private _scene;
  9. private _webSocket;
  10. /**
  11. * Constructs a reflector object.
  12. * @param scene The scene to use
  13. * @param hostname The hostname of the reflector bridge
  14. * @param port The port of the reflector bridge
  15. */
  16. constructor(scene: Scene, hostname: string, port: number);
  17. /**
  18. * Closes the reflector connection
  19. */
  20. close(): void;
  21. private _handleServerMessage;
  22. private _handleClientMessage;
  23. }