1#ifndef LIBFILEZILLA_ASCII_LAYER_HEADER
2#define LIBFILEZILLA_ASCII_LAYER_HEADER
23 ascii_layer(event_loop& loop, event_handler* handler,
socket_interface& next_layer);
24 virtual ~ascii_layer();
26 virtual int read(
void *
buffer,
unsigned int size,
int&
error)
override;
27 virtual int write(
void const*
buffer,
unsigned int size,
int&
error)
override;
34 virtual FZ_PRIVATE_SYMBOL
void operator()(
fz::event_base const& ev)
override;
37 std::optional<uint8_t> tmp_read_;
40 bool write_blocked_by_send_buffer_{};
virtual int shutdown() override
Signals peers that we want to close the connections.
virtual void set_event_handler(event_handler *handler, fz::socket_event_flag retrigger_block=fz::socket_event_flag{}) override
The handler for any events generated (or forwarded) by this layer.
The buffer class is a simple buffer where data can be appended at the end and consumed at the front....
Definition buffer.hpp:27
Common base class for all events.
Definition event.hpp:23
Simple handler for asynchronous event processing.
Definition event_handler.hpp:55
All classes sending socket events should derive from this.
Definition socket.hpp:85
Interface for sockets.
Definition socket.hpp:375
The namespace used by libfilezilla.
Definition apply.hpp:17
@ error
Operationf failed.
Definition aio.hpp:199
socket_event_flag
The type of a socket event.
Definition socket.hpp:35
Socket classes for networking.