Cleanup docs in uv::Stream and uv::Tcp (#1207)

This commit is contained in:
Peter Johnson
2018-07-22 13:01:14 -07:00
committed by GitHub
parent eed28a5852
commit 5bf5821138
2 changed files with 13 additions and 11 deletions

View File

@@ -97,6 +97,8 @@ class Stream : public Handle {
/**
* Start reading data from an incoming stream.
*
* This will only succeed after a connection has been established.
*
* A data signal will be emitted several times until there is no more
* data to read or `StopRead()` is called.
* An end signal will be emitted when there is no more data to read.
@@ -119,9 +121,9 @@ class Stream : public Handle {
* the data and use either its Complete() function or destructor to free the
* data.
*
* HandleWriteComplete() will be called on the request object when the data
* has been written. HandleWriteComplete() is called even if an error occurs.
* HandleError() will be called on the request object in case of errors.
* The finish signal will be emitted on the request object when the data
* has been written (or if an error occurs).
* The error signal will be emitted on the request object in case of errors.
*
* @param bufs The buffers to be written to the stream.
* @param req write request
@@ -135,8 +137,8 @@ class Stream : public Handle {
* the `bufs` parameter must exceed the lifetime of the write request.
* The callback can be used to free data after the request completes.
*
* The callback will be called when the data has been written. Errors will
* be reported to the stream error handler.
* The callback will be called when the data has been written (even if an
* error occurred). Errors will be reported to the stream error handler.
*
* @param bufs The buffers to be written to the stream.
* @param callback Callback function to call when the write completes

View File

@@ -225,9 +225,9 @@ class Tcp final : public NetworkStreamImpl<Tcp, uv_tcp_t> {
* (`0.0.0.0` or `::`) it will be changed to point to localhost. This is
* done to match the behavior of Linux systems.
*
* HandleConnected() is called on the request when the connection has been
* The connected signal is emitted on the request when the connection has been
* established.
* HandleError() is called on the request in case of errors during the
* The error signal is emitted on the request in case of errors during the
* connection.
*
* @param addr Initialized `sockaddr_in` or `sockaddr_in6` data structure.
@@ -275,9 +275,9 @@ class Tcp final : public NetworkStreamImpl<Tcp, uv_tcp_t> {
* (`0.0.0.0` or `::`) it will be changed to point to localhost. This is
* done to match the behavior of Linux systems.
*
* HandleConnected() is called on the request when the connection has been
* The connected signal is emitted on the request when the connection has been
* established.
* HandleError() is called on the request in case of errors during the
* The error signal is emitted on the request in case of errors during the
* connection.
*
* @param ip The address to which to connect to.
@@ -311,9 +311,9 @@ class Tcp final : public NetworkStreamImpl<Tcp, uv_tcp_t> {
* (`0.0.0.0` or `::`) it will be changed to point to localhost. This is
* done to match the behavior of Linux systems.
*
* HandleConnected() is called on the request when the connection has been
* The connected signal is emitted on the request when the connection has been
* established.
* HandleError() is called on the request in case of errors during the
* The error signal is emitted on the request in case of errors during the
* connection.
*
* @param ip The address to which to connect to.