Documentation for connection.connect()

v0.7.4-release
Ryan 2009-06-05 15:18:05 +02:00
parent 6e4e228665
commit 5170823572
1 changed files with 7 additions and 0 deletions

View File

@ -421,6 +421,13 @@ server.listen(7000, "localhost");</pre>
<dt><code>new node.tcp.Connection()</code></dt>
<dd>Creates a new connection object.</dd>
<dt><code>connection.connect(port, host="127.0.0.1")</code></dt>
<dd>
Opens a connection to the specified <code>port</code> and
<code>host</code>. If the second parameter is omitted, localhost is
assumed.
</dd>
<dt><code>connection.readyState</code></dt>
<dd>
Either <code>"closed"</code>, <code>"open"</code>,