Remove redundant post to strand in websocket.

This commit is contained in:
Tom Ritchford
2015-01-22 16:39:22 -05:00
parent c66fc2f656
commit b357390215

View File

@@ -112,7 +112,7 @@ public:
return port_->allow_admin;
};
static void ssend (connection_ptr cpClient, message_ptr mpMessage)
void send (connection_ptr cpClient, message_ptr mpMessage)
{
try
{
@@ -125,8 +125,8 @@ public:
}
}
static void ssendb (connection_ptr cpClient, std::string const& strMessage,
bool broadcast)
void send (connection_ptr cpClient, std::string const& strMessage,
bool broadcast)
{
try
{
@@ -142,23 +142,6 @@ public:
}
}
void send (connection_ptr cpClient, message_ptr mpMessage)
{
cpClient->get_strand ().post (
std::bind (
&WSServerHandler<endpoint_type>::ssend,
cpClient, mpMessage));
}
void send (connection_ptr cpClient, std::string const& strMessage,
bool broadcast)
{
cpClient->get_strand ().post (
std::bind (
&WSServerHandler<endpoint_type>::ssendb, cpClient, strMessage,
broadcast));
}
void send (connection_ptr cpClient, Json::Value const& jvObj, bool broadcast)
{
send (cpClient, to_string (jvObj), broadcast);