00001 /* 00002 * This source file is part of the ace-radius library. This code was 00003 * written by Alex Agranov in 2004-2009, and is covered by the BSD open source 00004 * license. Refer to the accompanying documentation for details on usage and 00005 * license. 00006 */ 00007 00008 #ifndef _RADIUSCLIENTCONNECTION_H__ 00009 #define _RADIUSCLIENTCONNECTION_H__ 00010 00011 #include "Radius.h" 00012 #include "RadiusAddress.h" 00013 #include "RadiusPacket.h" 00014 #include "RadiusSecret.h" 00015 00016 00017 class RadiusClientStack; 00018 00029 class RadiusClientConnection 00030 { 00031 public: 00033 00041 RadiusClientConnection(RadiusClientStack * p_stack, 00042 const RadiusSecret & p_secret, 00043 const char * p_hostname, 00044 uint16_t p_port = D_RADIUS_AUTHENTICATION_PORT, 00045 int p_responseTimeout = 5, 00046 int p_retransmitCount = 4); 00047 00048 ~RadiusClientConnection(); 00049 00051 00062 RadiusPacket * sendPacket(RadiusPacket & p_packet); 00063 00064 private: 00065 00067 RadiusClientStack * m_stack; 00068 00070 RadiusSecret m_secret; 00071 00073 RadiusPacket m_packet; 00074 00076 RadiusAddress m_serverAddress; 00077 00079 int m_responseTimeout; 00080 00082 int m_retransmitCount; 00083 }; 00084 00085 #endif // _RADIUSCLIENTCONNECTION_H__ 00086