mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:27:34 +00:00
LibGUI: Add GTCPSocket and base class GSocket (inherits from GIODevice.)
And use these to do the line-by-line reading automagically instead of having that logic in IRCClient. This will definitely come in handy.
This commit is contained in:
parent
d466f2634d
commit
8e3d0a23d5
12 changed files with 267 additions and 86 deletions
|
@ -29,8 +29,13 @@ public:
|
|||
ByteBuffer read(int max_size);
|
||||
ByteBuffer read_line(int max_size);
|
||||
|
||||
// FIXME: I would like this to be const but currently it needs to call populate_read_buffer().
|
||||
bool can_read_line();
|
||||
|
||||
bool can_read() const;
|
||||
|
||||
virtual bool open(GIODevice::OpenMode) = 0;
|
||||
virtual bool close() = 0;
|
||||
virtual bool close();
|
||||
|
||||
virtual const char* class_name() const override { return "GIODevice"; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue