00001 #ifndef __XRDNETPEER_H__ 00002 #define __XRDNETPEER_H__ 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d N e t P e e r . h h */ 00006 /* */ 00007 /* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University */ 00008 /* All Rights Reserved */ 00009 /* Produced by Andrew Hanushevsky for Stanford University under contract */ 00010 /* DE-AC02-76-SFO0515 with the Department of Energy */ 00011 /******************************************************************************/ 00012 00013 // $Id: XrdNetPeer.hh 22437 2008-03-04 14:35:16Z rdm $ 00014 00015 #include <stdlib.h> 00016 00017 #include "XrdNet/XrdNetBuffer.hh" 00018 00019 class XrdNetPeer 00020 { 00021 public: 00022 00023 int fd; // File descriptor 00024 struct sockaddr InetAddr; // Incomming peer network address 00025 char *InetName; // Incomming peer host name (must be copied) 00026 XrdNetBuffer *InetBuff; // Incomming datagram buffer for UDP accepts 00027 00028 XrdNetPeer() {InetName = 0; InetBuff = 0;} 00029 ~XrdNetPeer() {if (InetName) free(InetName); 00030 if (InetBuff) InetBuff->Recycle(); 00031 } 00032 }; 00033 #endif