00001 /* 00002 ** This file is part of Vidalia, and is subject to the license terms in the 00003 ** LICENSE file, found in the top level directory of this distribution. If you 00004 ** did not receive the LICENSE file with this file, you may obtain it from the 00005 ** Vidalia source package distributed by the Vidalia Project at 00006 ** http://www.vidalia-project.net/. No part of Vidalia, including this file, 00007 ** may be copied, modified, propagated, or distributed except according to the 00008 ** terms described in the LICENSE file. 00009 */ 00010 00011 /* 00012 ** \file net.h 00013 ** \version $Id: net.h 2362 2008-02-29 04:30:11Z edmanm $ 00014 ** \brief Common network I/O and utility functions 00015 */ 00016 00017 #ifndef _NET_H 00018 #define _NET_H 00019 00020 #include <QHostAddress> 00021 00022 /** Attempts a connection to <b>host</b> on <b>port</b>. Returns true if the 00023 * connection was successful, or false if the connection attempt failed. */ 00024 bool net_test_connect(QHostAddress host, quint16 port, int timeout = 250); 00025 00026 #endif 00027