xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdNet
XrdNetConnect.hh
Go to the documentation of this file.
1
#ifndef __XRDNETCONNECT__
2
#define __XRDNETCONNECT__
3
/******************************************************************************/
4
/* */
5
/* X r d N e t C o n n e c t . h h */
6
/* */
7
/* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University */
8
/* All Rights Reserved */
9
/* Produced by Andrew Hanushevsky for Stanford University under contract */
10
/* DE-AC02-76-SFO0515 with the Department of Energy */
11
/******************************************************************************/
12
13
// $Id$
14
15
#include <sys/types.h>
16
#ifndef WIN32
17
#include <sys/socket.h>
18
#else
19
#include <Winsock2.h>
20
#endif
21
22
class
XrdNetConnect
23
{
24
public
:
25
26
// Connect() performs the same function as sycall connect() however, it
27
// can optionally apply a thread-safe timeout of tsec seconds.
28
// It returns 0 upon success or errno upon failure.
29
//
30
static
int
Connect
(
int
fd,
// Open socket descriptor
31
const
struct
sockaddr *name,
// Address to connect to
32
int
namelen,
// Size of address
33
int
tsec=-1);
// Optional timeout
34
35
private
:
36
// Only this class is allowed to create and delete this object
37
//
38
XrdNetConnect
() {}
39
~XrdNetConnect
() {}
40
};
41
#endif
Generated by
1.8.1.2