1
0
mirror of https://gitlab.com/obbart/universal_robots_ros_driver.git synced 2026-04-10 01:50:46 +02:00

minor improvements

This commit is contained in:
Simon Rasmussen
2017-07-07 19:15:17 +02:00
parent 93bf3487dd
commit f3e11bfc29
2 changed files with 8 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ protected:
public:
URServer(int port);
~URServer();
std::string getIP();
bool bind();
bool accept();

View File

@@ -10,6 +10,11 @@ URServer::URServer(int port)
{
}
URServer::~URServer()
{
TCPSocket::close();
}
void URServer::setOptions(int socket_fd)
{
TCPSocket::setOptions(socket_fd);
@@ -61,6 +66,8 @@ bool URServer::accept()
if(client_fd <= 0)
return false;
setOptions(client_fd);
return client_.setSocketFD(client_fd);
}