mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 15:28:43 +02:00
work to make documentation unified.
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
scan() Netscript Function
|
||||
=========================
|
||||
|
||||
.. js:function:: scan(hostname/ip=current ip[, hostnames=true])
|
||||
.. js:function:: scan(hostname=current hostname)
|
||||
|
||||
:param string hostname/ip: IP or hostname of the server to scan
|
||||
:param boolean: Optional boolean specifying whether the function should output hostnames (if true) or IP addresses (if false)
|
||||
:RAM cost: 0.2 GB
|
||||
:param string hostname: Hostname of the server to scan.
|
||||
:returns: array of strings of all the host directly connected to the target
|
||||
server.
|
||||
|
||||
Returns an array containing the hostnames or IPs of all servers that are one node way from the specified target server. The
|
||||
hostnames/IPs in the returned array are strings.
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
scan("home"); // returns: ["foodnstuff", "sigma-cosmetics", "joesguns", "hong-fang-tea", "harakiri-sushi", "iron-gym"]
|
||||
Reference in New Issue
Block a user