bitburner-src/doc/source/netscript/basicfunctions/tryWrite.rst

15 lines
498 B
ReStructuredText
Raw Normal View History

tryWrite() Netscript Function
=============================
.. js:function:: tryWrite(port, data="")
2021-03-12 08:51:56 +01:00
:RAM cost: 1 GB
:param number port: Port to be written to
:param string data: Data to try to write
2021-03-12 08:51:56 +01:00
:returns: ``true`` if the data is successfully written to the port.
Attempts to write data to the specified Netscript Port. If the port is full,
the data will not be written. Otherwise, the data will be written normally.
See :ref:`netscript_ports` for more details.