summaryrefslogtreecommitdiff
path: root/src/WebSocketInteractionCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-09-30 00:50:14 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-09-30 00:50:14 +0900
commit90515dfa50c676df37f440893de6e344fbfd2cdc (patch)
tree257d86e0614b6eb0ea8e9384af3269d60a53dbbc /src/WebSocketInteractionCommand.cc
parent4b94ede268ff2ff793b22a0730dcbda09d280618 (diff)
RPC over SSL/TLS transport
To enable RPC over SSL/TLS, specify server certificate and private key using --rpc-certificate and --rpc-private-key options and enable --rpc-secure option. After the encryption is enabled, use https and wss scheme to access RPC server.
Diffstat (limited to 'src/WebSocketInteractionCommand.cc')
-rw-r--r--src/WebSocketInteractionCommand.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/WebSocketInteractionCommand.cc b/src/WebSocketInteractionCommand.cc
index 4d7f26f8..9dccc3c3 100644
--- a/src/WebSocketInteractionCommand.cc
+++ b/src/WebSocketInteractionCommand.cc
@@ -73,7 +73,7 @@ WebSocketInteractionCommand::~WebSocketInteractionCommand()
void WebSocketInteractionCommand::updateWriteCheck()
{
- if(wsSession_->wantWrite()) {
+ if(socket_->wantWrite() || wsSession_->wantWrite()) {
if(!writeCheck_) {
writeCheck_ = true;
e_->addSocketForWriteCheck(socket_, this);
@@ -91,9 +91,10 @@ bool WebSocketInteractionCommand::execute()
}
if(wsSession_->onReadEvent() == -1 || wsSession_->onWriteEvent() == -1) {
if(wsSession_->closeSent() || wsSession_->closeReceived()) {
- A2_LOG_INFO(fmt("CUID#%" PRId64 " - WebSocket session terminated.", getCuid()));
+ A2_LOG_INFO(fmt("CUID#%"PRId64" - WebSocket session terminated.",
+ getCuid()));
} else {
- A2_LOG_INFO(fmt("CUID#%" PRId64 " - WebSocket session terminated"
+ A2_LOG_INFO(fmt("CUID#%"PRId64" - WebSocket session terminated"
" (Possibly due to EOF).", getCuid()));
}
return true;