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:
@@ -24,6 +24,7 @@ protected:
|
||||
|
||||
public:
|
||||
URServer(int port);
|
||||
~URServer();
|
||||
std::string getIP();
|
||||
bool bind();
|
||||
bool accept();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user