I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit b64ffb7a authored by Mikal Villa's avatar Mikal Villa Committed by str4d
Browse files

I2PSAM: Don't connect socket in constructor.

parent af34c2b8
No related branches found
No related tags found
No related merge requests found
......@@ -65,10 +65,6 @@ Socket::Socket(const std::string& SAMHost, uint16_t SAMPort, const std::string&
servAddr_.sin_family = AF_INET;
servAddr_.sin_addr.s_addr = inet_addr(SAMHost.c_str());
servAddr_.sin_port = htons(SAMPort);
init();
if (isOk())
handshake();
}
Socket::Socket(const sockaddr_in& addr, const std::string &minVer, const std::string& maxVer)
......@@ -107,6 +103,13 @@ Socket::~Socket()
#endif
}
void Socket::bootstrapI2P()
{
init();
if (isOk())
handshake();
}
void Socket::init()
{
socket_ = socket(AF_INET, SOCK_STREAM, 0);
......
......@@ -217,6 +217,8 @@ public:
explicit Socket(const Socket& rhs); // creates a new socket with the same parameters
~Socket();
void bootstrapI2P();
void write(const std::string& msg);
std::string read();
SOCKET release();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment