non-blocking connect is available for writing (i.e. the connection
was successful) when the connection has actually failed. This
caused synergy to rapidly retry connecting. This change makes
synergy check for a connection error whether one was reported or
not. Thankfully, OS X does correctly set the socket error state
when it bogusly reports a successful connection so we can tell the
connection failed.
a synergy client on that OS and pointed it at a system that wasn't
listening for connections then instead of the connection attempt
failing with 'connection refused' the system would claim the
connection succeeded. A subsequent read would reveal the problem
and synergy would "disconnect" and retry, causing the CPU to spin.
The system does correctly set the socket error state so this
workaround checks for socket errors when connecting whether or not
select reports an error state.
Also, sometimes the system doesn't claim success but doesn't report
an error. Synergy eventually times out these attempts.
event loop model. Streams, stream filters, and sockets are
converted. Client proxies are almost converted. CServer is
in progress. Removed all HTTP code. Haven't converted the
necessary win32 arch stuff.
an event queue and events, TCP sockets converted to use events,
unix multithreading and network stuff converted, and an X Windows
event queue subclass.
lib/arch. This should make porting easier. Will probably
continue to refactor a little more, moving platform dependent
event handling stuff into lib/platform.
an internal compiler error; building that file without
optimization works around the compiler bug. Sadly, synergy can
only interact with X windows, not native MacOS windows.
handling read errors at all and error handling for writes was
never being used. Now the socket disconnects if a read or write
fails on the socket for any reason except EINTR. Also added
<netinet/in.h> to includes in CNetwork.h because it's needed on
some platforms.
anyway but isn't implemented in winsock, removed use of INADDR_NONE
which some platforms don't define except on winsock which does
define it, and changed SOL_TCP to IPPROTO_TCP which should work on
more platforms.
from config.h if available (which means version is now a
string, not three integers). Changed version to 1.0.0 and
protocol version to 1.0. And added MAINTAINERCLEANFILES
to makefiles to remove generated files.
synergy.cpp and server.cpp into cmd/synergyd as synergyd.cpp.
Moved and renamed related files. Moved remaining source files
into lib/.... Modified and added makefiles as appropriate.
Result is that library files are under lib with each library
in its own directory and program files are under cmd with each
command in its own directory.