mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-14 11:43:50 +01:00
33 lines
756 B
Markdown
33 lines
756 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [scan](./bitburner.ns.scan.md)
|
|
|
|
## NS.scan() method
|
|
|
|
Get the list of servers connected to a server.
|
|
|
|
<b>Signature:</b>
|
|
|
|
```typescript
|
|
scan(host?: string): string[];
|
|
```
|
|
|
|
## Parameters
|
|
|
|
| Parameter | Type | Description |
|
|
| --- | --- | --- |
|
|
| host | string | Optional, Hostname of the server to scan, default to current server. |
|
|
|
|
<b>Returns:</b>
|
|
|
|
string\[\]
|
|
|
|
Returns an string of hostnames.
|
|
|
|
## Remarks
|
|
|
|
RAM cost: 0.2 GB
|
|
|
|
Returns an array containing the hostnames of all servers that are one node way from the specified target server. The hostnames in the returned array are strings.
|
|
|