aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/HTTPServer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/rfb/HTTPServer.cxx')
-rw-r--r--common/rfb/HTTPServer.cxx19
1 files changed, 18 insertions, 1 deletions
diff --git a/common/rfb/HTTPServer.cxx b/common/rfb/HTTPServer.cxx
index f50722ab..54becbb2 100644
--- a/common/rfb/HTTPServer.cxx
+++ b/common/rfb/HTTPServer.cxx
@@ -337,7 +337,7 @@ HTTPServer::removeSocket(network::Socket* sock) {
}
void
-HTTPServer::processSocketEvent(network::Socket* sock) {
+HTTPServer::processSocketReadEvent(network::Socket* sock) {
std::list<Session*>::iterator i;
for (i=sessions.begin(); i!=sessions.end(); i++) {
if ((*i)->getSock() == sock) {
@@ -356,6 +356,23 @@ HTTPServer::processSocketEvent(network::Socket* sock) {
throw rdr::Exception("invalid Socket in HTTPServer");
}
+void
+HTTPServer::processSocketWriteEvent(network::Socket* sock) {
+ std::list<Session*>::iterator i;
+ for (i=sessions.begin(); i!=sessions.end(); i++) {
+ if ((*i)->getSock() == sock) {
+ try {
+ sock->outStream().flush();
+ } catch (rdr::Exception& e) {
+ vlog.error("untrapped: %s", e.str());
+ sock->shutdown();
+ }
+ return;
+ }
+ }
+ throw rdr::Exception("invalid Socket in HTTPServer");
+}
+
void HTTPServer::getSockets(std::list<network::Socket*>* sockets)
{
sockets->clear();