add socketDescriptor() method to ESL::Connection obj

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13770 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-06-12 22:57:13 +00:00
parent 9675a6e24b
commit 04a965edb3
11 changed files with 148 additions and 0 deletions

View File

@@ -33,6 +33,16 @@ ESLconnection::~ESLconnection()
}
int ESLconnection::socketDescriptor()
{
if (handle.connected) {
return (int) handle.sock;
}
return -1;
}
int ESLconnection::disconnect()
{
if (handle.connected) {

View File

@@ -76,6 +76,7 @@ class ESLconnection {
ESLconnection(const char *host, const char *port, const char *password);
ESLconnection(int socket);
virtual ~ESLconnection();
int socketDescriptor();
int connected();
ESLevent *getInfo();
int send(const char *cmd);