diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-04-26 16:51:41 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-04-26 16:51:41 +0000 |
commit | 37a53f1ac69315f1915aae67a447fb7b813e8217 (patch) | |
tree | 57c0367cce15e2f81fcab530f35bf343505cfeb8 /src/modules/m_spanningtree/treesocket.h | |
parent | 225636f9d7aebe4556d1435fd6db04765f9a25cd (diff) |
Make error reporting work properly, it seemed to loose errors.
First change: Add a culling list of inspsockets waiting to be closed, so the close() is less likely to be called before the buffer is entirely empty. This seems to work well on my LAN.
Second change: Add a SendError() method, rather than WriteLine("ERROR : ..."). This can be used to effect by also echoing out "Sent ERROR to %s: ..." onto the +l snomask meaning at least one end
will always see the error even if the ERROR command is lost due to latency or design of the transport (e.g. ssl which may be writing during a read event etc)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6844 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/treesocket.h')
-rw-r--r-- | src/modules/m_spanningtree/treesocket.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/treesocket.h b/src/modules/m_spanningtree/treesocket.h index ff06f0926..15ca8f4cb 100644 --- a/src/modules/m_spanningtree/treesocket.h +++ b/src/modules/m_spanningtree/treesocket.h @@ -171,6 +171,11 @@ class TreeSocket : public InspSocket */ virtual void OnError(InspSocketError e); + /** Sends an error to the remote server, and displays it locally to show + * that it was sent. + */ + void SendError(const std::string &errormessage); + /** Handle socket disconnect event */ virtual int OnDisconnect(); |