-#include "stg_client.h"
-
-using namespace std;
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-STG_CLIENT::STG_CLIENT(const std::string & host, uint16_t port, uint16_t lp, const std::string & pass)
- : localPort(lp),
- password(pass),
- framedIP(0)
-{
-sock = socket(AF_INET, SOCK_DGRAM, 0);
-if (sock == -1)
- {
- std::string message = strerror(errno);
- message = "Socket create error: '" + message + "'";
- throw std::runtime_error(message);
- }
-
-struct hostent * he = NULL;
-he = gethostbyname(host.c_str());
-if (he == NULL)
- {
- throw std::runtime_error("gethostbyname error");
- }