bitburner-src/markdown/bitburner.ns.scan.md

33 lines
756 B
Markdown
Raw Normal View History

2021-10-30 12:34:14 -04:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [scan](./bitburner.ns.scan.md)
## NS.scan() method
2022-01-08 13:25:06 -05:00
Get the list of servers connected to a server.
2021-10-30 12:34:14 -04:00
<b>Signature:</b>
```typescript
2021-12-16 15:21:00 -05:00
scan(host?: string): string[];
2021-10-30 12:34:14 -04:00
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
2022-01-08 13:25:06 -05:00
| host | string | Optional, Hostname of the server to scan, default to current server. |
2021-10-30 12:34:14 -04:00
<b>Returns:</b>
2021-10-30 15:46:34 -04:00
string\[\]
2021-10-30 12:34:14 -04:00
2021-12-16 15:21:00 -05:00
Returns an string of hostnames.
2021-10-30 12:34:14 -04:00
## Remarks
2021-10-30 15:46:34 -04:00
RAM cost: 0.2 GB
2021-10-30 12:34:14 -04:00
2021-12-16 15:21:00 -05:00
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.