Ejemplo n.º 1
0
BOOL
vncServer::SetHttpdEnabled(BOOL enable_httpd, BOOL enable_params)
{
	if (enable_httpd != m_httpd_enabled) {
		m_httpd_enabled = enable_httpd;
		m_httpd_params_enabled = enable_params;
		BOOL socketConn = SockConnected();
		SockConnect(FALSE);
		SockConnect(socketConn);
	} else {
		if (enable_params != m_httpd_params_enabled) {
			m_httpd_params_enabled = enable_params;
			if (SockConnected()) {
				SockConnect(FALSE);
				SockConnect(TRUE);
			}
		}
	}
	return TRUE;
}
Ejemplo n.º 2
0
BOOL
vncServer::SetLoopbackOnly(BOOL loopbackOnly)
{
	if (loopbackOnly != m_loopbackOnly)
	{
		m_loopbackOnly = loopbackOnly;
		BOOL socketConn = SockConnected();
		SockConnect(FALSE);
		SockConnect(socketConn);
	}
	return TRUE;
}
// TightVNC 1.2.7
void
vncServer::SetPorts(const UINT port_rfb, const UINT port_http)
{
	if (m_port != port_rfb || m_port_http != port_http) {
		// Set port numbers to use
		m_port = port_rfb;
		m_port_http = port_http;

		// If there is already a listening socket then close and re-open it...
		BOOL socketon = SockConnected();
		SockConnect(FALSE);
		if (socketon)
			SockConnect(TRUE);
    }
}
Ejemplo n.º 4
0
void
vncServer::SetPort(const UINT port)
{
    if (m_port != port)
    {
	/////////////////////////////////
	// Adjust the listen socket

	// Set the port number to use
	m_port = port;

	// If there is already a listening socket then close and re-open it...
	BOOL socketon = SockConnected();

	SockConnect(FALSE);
	if (socketon)
	    SockConnect(TRUE);

    }
}