aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index aa9b2c11a3..cb35d8c4f2 100644
--- a/src/net.h
+++ b/src/net.h
@@ -598,6 +598,23 @@ public:
}
}
+ /** Send a message containing a1, serialized with flag flag. */
+ template<typename T1>
+ void PushMessageWithFlag(int flag, const char* pszCommand, const T1& a1)
+ {
+ try
+ {
+ BeginMessage(pszCommand);
+ WithOrVersion(&ssSend, flag) << a1;
+ EndMessage(pszCommand);
+ }
+ catch (...)
+ {
+ AbortMessage();
+ throw;
+ }
+ }
+
template<typename T1, typename T2>
void PushMessage(const char* pszCommand, const T1& a1, const T2& a2)
{