UsenetSearch/src/main.cpp

31 lines
577 B
C++

#include <iostream>
#include <memory>
#include "usenetsearch/UsenetClient.h"
int main(int argc, char* argv[])
{
(void) argc;
(void) argv;
std::string host = "news.newshosting.com";
std::uint16_t port = 443;
bool useSSL = true;
usenetsearch::UsenetClient client;
try
{
client.Connect(host, port, useSSL);
client.Authenticate(L"xxxxxxx", L"yyyyy");
}
catch (const std::exception& e)
{
std::cerr << e.what() << std::endl;;
return 1;
}
std::cout << "success." << std::endl;
return 0;
}