| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
All users are now contained in reds_stream.c
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces async_read_set_error_handler() which was unused. This sets a
callback to be called when an async operation fails.
We could pass the error_handler to each reds_stream_async_read() call, but as
we will be using the same one for all async calls, it's more convenient to set it
once and for all.
AsyncRead is going to be private to reds_stream.c in one of the next
commits, and the error handler will need to be set from reds.c,
hence the move to a public RedsStream method.
|
|
|
|
| |
This will allow to make RedsStream::async_read private
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The private data is allocated at the same time as RedsStream and
goes immediatly after the main RedsStream data.
This private member will allow to hide internal RedsStream
implementation details from the rest of spice-server.
|
|
|
|
|
|
| |
SASL authentication mostly use members from RedsStream to do its work, so
it makes sense to have its code in reds_stream.c. This should allow to make
RedsStream::sasl private in the future.
|
|
|
|
|
|
| |
The AsyncRead structure in reds.h wraps an async read + callback to
be done on a stream. Moving it to reds_stream.h is needed in order
to move SASL authentication there.
|
|
|
|
|
|
| |
Initializing a new stream means initializing quite a few fields.
This commit factors this initialization in a dedicated reds_stream_new
helper. This also helps moving more code from reds.c to reds_stream.c
|
|
|
|
| |
Code to initiate a SSL stream belongs there
|
|
|
|
| |
They are renamed to reds_stream_write*
|
|
Gather common RedsStream code there rather than having it
in reds.c
|