3
A brief file description
5
@section license License
7
Licensed to the Apache Software Foundation (ASF) under one
8
or more contributor license agreements. See the NOTICE file
9
distributed with this work for additional information
10
regarding copyright ownership. The ASF licenses this file
11
to you under the Apache License, Version 2.0 (the
12
"License"); you may not use this file except in compliance
13
with the License. You may obtain a copy of the License at
15
http://www.apache.org/licenses/LICENSE-2.0
17
Unless required by applicable law or agreed to in writing, software
18
distributed under the License is distributed on an "AS IS" BASIS,
19
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
See the License for the specific language governing permissions and
21
limitations under the License.
24
/**************************************************************************
29
**************************************************************************/
31
#ifndef __P_DNSCONNECTION_H__
32
#define __P_DNSCONNECTION_H__
34
#include "I_EventSystem.h"
40
#define NON_BLOCKING_CONNECT true
41
#define BLOCKING_CONNECT false
42
#define CONNECT_WITH_TCP true
43
#define CONNECT_WITH_UDP false
44
#define NON_BLOCKING true
45
#define BLOCKING false
46
#define BIND_RANDOM_PORT true
47
#define BIND_ANY_PORT false
48
#define ENABLE_MC_LOOPBACK true
49
#define DISABLE_MC_LOOPBACK false
50
#define BC_NO_CONNECT true
51
#define BC_CONNECT false
52
#define BC_NO_BIND true
63
struct sockaddr_in sa;
65
LINK(DNSConnection, link);
70
int connect(unsigned int ip, int port,
71
bool non_blocking_connect = NON_BLOCKING_CONNECT,
72
bool use_tcp = CONNECT_WITH_TCP, bool non_blocking = NON_BLOCKING, bool bind_random_port = BIND_ANY_PORT);
76
virtual ~DNSConnection();
80
#endif /*_P_DNSConnection_h*/