Skip to content

Latest commit

 

History

History
62 lines (30 loc) · 998 Bytes

File metadata and controls

62 lines (30 loc) · 998 Bytes

Home > bitburner > NS > getServer

NS.getServer() method

Returns data of a server.

If the server is a darknet server, it will also contain the "isOnline" field. If the darknet server has recently gone offline, the returned object will be a dummy server object with isOnline: false.

Signature:

getServer(host?: string): Server & { isOnline?: boolean };

Parameters

Parameter

Type

Description

host

string

(Optional) Optional. Hostname/IP of the server. Defaults to the hostname of the running script's server.

Returns:

Server & { isOnline?: boolean }

Data of the server.

Remarks

RAM cost: 2 GB