diff options
| author | Adam <Adam@anope.org> | 2010-08-15 01:45:38 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-08-15 01:45:38 -0400 |
| commit | a950ed8cabfeca55c909f02412b1788bd386dcff (patch) | |
| tree | cfa9a16c2385176490ea849f6a4041ee9456c8eb /include/sockets.h | |
| parent | 4d0a1aaabd861bb7cd1e378bd1e600af1d34d5d2 (diff) | |
Rewrote the MySQL API to use threads. This acts similar to before, but is faster. Removed db_mysql_execute for now.
Diffstat (limited to 'include/sockets.h')
| -rw-r--r-- | include/sockets.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/sockets.h b/include/sockets.h index 78ed5f4af..6eeb3bf3d 100644 --- a/include/sockets.h +++ b/include/sockets.h @@ -81,6 +81,10 @@ class CoreExport Socket : public Flags<SocketFlag, 1> /* Type this socket is */ SocketType Type; + /** Empty constructor, used for things such as the pipe socket + */ + Socket(); + /** Default constructor * @param nsock The socket to use, 0 if we need to create our own * @param nIPv6 true if using ipv6 @@ -149,6 +153,26 @@ class CoreExport Socket : public Flags<SocketFlag, 1> void Write(const Anope::string &message); }; +class CoreExport Pipe : public Socket +{ + private: + int WritePipe; + + int RecvInternal(char *buf, size_t sz) const; + + int SendInternal(const Anope::string &buf) const; + public: + Pipe(); + + bool ProcessRead(); + + bool Read(const Anope::string &); + + void Notify(); + + virtual void OnNotify(); +}; + class CoreExport ClientSocket : public Socket { protected: |
