Move socket write event handling in to the RFB core
What to do when a socket is writeable should be handled in the
RFB core code as there may be other events we want to fire off
when this happens.
diff --git a/unix/x0vncserver/x0vncserver.cxx b/unix/x0vncserver/x0vncserver.cxx
index 6b5d479..791714e 100644
--- a/unix/x0vncserver/x0vncserver.cxx
+++ b/unix/x0vncserver/x0vncserver.cxx
@@ -593,7 +593,7 @@
// Process events on existing VNC connections
for (i = sockets.begin(); i != sockets.end(); i++) {
if (FD_ISSET((*i)->getFd(), &rfds))
- server.processSocketEvent(*i);
+ server.processSocketReadEvent(*i);
}
if (desktop.isRunning() && sched.goodTimeToPoll()) {
diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc
index 9b91d9a..f1c9b74 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.cc
+++ b/unix/xserver/hw/vnc/XserverDesktop.cc
@@ -495,7 +495,7 @@
int fd = (*i)->getFd();
if (FD_ISSET(fd, fds)) {
FD_CLR(fd, fds);
- server->processSocketEvent(*i);
+ server->processSocketReadEvent(*i);
}
}
@@ -505,7 +505,7 @@
int fd = (*i)->getFd();
if (FD_ISSET(fd, fds)) {
FD_CLR(fd, fds);
- httpServer->processSocketEvent(*i);
+ httpServer->processSocketReadEvent(*i);
}
}
}
@@ -581,7 +581,7 @@
int fd = (*i)->getFd();
if (FD_ISSET(fd, fds)) {
FD_CLR(fd, fds);
- (*i)->outStream().flush();
+ server->processSocketWriteEvent(*i);
}
}
@@ -591,7 +591,7 @@
int fd = (*i)->getFd();
if (FD_ISSET(fd, fds)) {
FD_CLR(fd, fds);
- (*i)->outStream().flush();
+ httpServer->processSocketWriteEvent(*i);
}
}
}