node-insim
Version:
An InSim library for NodeJS with TypeScript support
38 lines (37 loc) • 1.08 kB
TypeScript
import { Packet } from './base';
import { PacketType } from './enums';
/**
* InSim Multi
*
* LFS will send this packet when a host is started or joined.
*
* On ending or leaving a host, LFS will send this {@link IS_TINY}:
*
* - ReqI: 0
* - SubT: {@link TINY_MPE} (MultiPlayerEnd)
*
* To request an {@link IS_ISM} packet at any time, send this {@link IS_TINY}:
*
* - ReqI: non-zero (returned in the reply)
* - SubT: {@link TINY_ISM} (request an {@link IS_ISM})
*
* NOTE: If LFS is not in multiplayer mode, the host name in the ISM will be empty.
*/
export declare class IS_ISM extends Packet {
readonly Size = 40;
readonly Type = PacketType.ISP_ISM;
/** Usually 0 / or if a reply: ReqI as received in the {@link TINY_ISM} */
ReqI: number;
readonly Zero = 0;
/** 0 = guest / 1 = host */
Host: MultiplayerHostMode;
private readonly Sp1;
private readonly Sp2;
private readonly Sp3;
/** The name of the host joined or started */
HName: string;
}
export declare enum MultiplayerHostMode {
GUEST = 0,
HOST = 1
}