summaryrefslogtreecommitdiffstats
path: root/common/rfb/HTTPServer.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2016-04-29 15:55:06 +0200
committerPierre Ossman <ossman@cendio.se>2016-04-29 15:55:06 +0200
commit2b949c2a8b02be4920388ce58a473e8cdc182b43 (patch)
treef13776e9e180d7e6ddf556424ade7ef19fa0d924 /common/rfb/HTTPServer.cxx
parent75bbf640a4240e57406ae171473d26dde2636389 (diff)
parent352d062e982ea38506756c04b9f4362d0f1ae892 (diff)
downloadtigervnc-2b949c2a8b02be4920388ce58a473e8cdc182b43.tar.gz
tigervnc-2b949c2a8b02be4920388ce58a473e8cdc182b43.zip
Merge branch 'socket' of https://github.com/CendioOssman/tigervnc
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();