supportsDesktopResize(false), supportsLEDState(false),
is(0), os(0), reader_(0), writer_(0),
shared(false),
- state_(RFBSTATE_UNINITIALISED),
+ state_(RFBSTATE_UNINITIALISED), serverName(strDup("")),
pendingPFChange(false), preferredEncoding(encodingTight),
compressLevel(2), qualityLevel(-1),
formatChange(false), encodingChange(false),
close();
}
+void CConnection::setServerName(const char* name_)
+{
+ if (name_ == NULL)
+ name_ = "";
+ serverName.replaceBuf(strDup(name_));
+}
+
void CConnection::setStreams(rdr::InStream* is_, rdr::OutStream* os_)
{
is = is_;
// which we are connected. This might be the result of getPeerEndpoint on
// a TcpSocket, for example, or a host specified by DNS name & port.
// The serverName is used when verifying the Identity of a host (see RA2).
- void setServerName(const char* name_) { serverName.replaceBuf(strDup(name_)); }
+ void setServerName(const char* name_);
// setStreams() sets the streams to be used for the connection. These must
// be set before initialiseProtocol() and processMsg() are called. The