|
@ -196,16 +196,22 @@ context of the defined or default list of trusted CA certificates. |
|
|
Returns a JSON structure detailing the peer's certificate, containing a dictionary |
|
|
Returns a JSON structure detailing the peer's certificate, containing a dictionary |
|
|
with keys for the certificate `'subject'`, `'issuer'`, `'valid_from'` and `'valid_to'`. |
|
|
with keys for the certificate `'subject'`, `'issuer'`, `'valid_from'` and `'valid_to'`. |
|
|
|
|
|
|
|
|
#### stream.write(data, encoding='ascii') |
|
|
#### stream.write(data, [encoding]) |
|
|
|
|
|
|
|
|
Sends data on the stream. The second parameter specifies the encoding in |
|
|
Sends data on the stream. The second parameter specifies the encoding in the |
|
|
the case of a string--it defaults to ASCII because encoding to UTF8 is rather |
|
|
case of a string--it defaults to UTF8 encoding. |
|
|
slow. |
|
|
|
|
|
|
|
|
|
|
|
Returns `true` if the entire data was flushed successfully to the kernel |
|
|
Returns `true` if the entire data was flushed successfully to the kernel |
|
|
buffer. Returns `false` if all or part of the data was queued in user memory. |
|
|
buffer. Returns `false` if all or part of the data was queued in user memory. |
|
|
`'drain'` will be emitted when the buffer is again free. |
|
|
`'drain'` will be emitted when the buffer is again free. |
|
|
|
|
|
|
|
|
|
|
|
#### stream.write(data, [encoding], [fileDescriptor]) |
|
|
|
|
|
|
|
|
|
|
|
For UNIX sockets, it is possible to send a file descriptor through the |
|
|
|
|
|
stream. Simply add the `fileDescriptor` argument and listen for the `'fd'` |
|
|
|
|
|
event on the other end. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#### stream.end([data], [encoding]) |
|
|
#### stream.end([data], [encoding]) |
|
|
|
|
|
|
|
|
Half-closes the stream. I.E., it sends a FIN packet. It is possible the |
|
|
Half-closes the stream. I.E., it sends a FIN packet. It is possible the |
|
|