Create TCPSession2 for outpubound connections.
This commit is contained in:
1 parent
5c87225c6f
commit
fd70c79282
129 files changed
+1902
-710
No files matched your search
+6
-6
@@ -1,7 +1,7 @@
|
||||
#include "IPAddress.h"
|
||||
|
||||
namespace core {
|
||||
|
||||
|
||||
IPAddress::IPAddress() {
|
||||
addressLength = sizeof(addr);
|
||||
}
|
||||
@@ -14,7 +14,7 @@ namespace core {
|
||||
convert >> port;
|
||||
IPAddress(url, port);
|
||||
}
|
||||
|
||||
|
||||
IPAddress::IPAddress(std::string address, int port) {
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.sin_family = AF_INET;
|
||||
@@ -25,7 +25,7 @@ namespace core {
|
||||
}
|
||||
|
||||
IPAddress::~IPAddress() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
struct sockaddr * IPAddress::getPointer() {
|
||||
@@ -36,16 +36,16 @@ namespace core {
|
||||
std::string result;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
std::string IPAddress::getClientAddressAndPort() {
|
||||
std::stringstream out;
|
||||
out << inet_ntoa(addr.sin_addr);
|
||||
out << ":" << addr.sin_port;
|
||||
return out.str();
|
||||
}
|
||||
|
||||
|
||||
int IPAddress::getClientPort() {
|
||||
int result = -1;
|
||||
int result = -1;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user