mirror of
https://gitlab.com/obbart/universal_robots_ros_driver.git
synced 2026-04-10 10:00:48 +02:00
Clang-format run
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include <netdb.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <mutex>
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
|
||||
enum class SocketState
|
||||
@@ -26,23 +26,28 @@ protected:
|
||||
return false;
|
||||
}
|
||||
virtual void setOptions(int socket_fd);
|
||||
|
||||
|
||||
|
||||
bool setup(std::string &host, int port);
|
||||
|
||||
public:
|
||||
TCPSocket();
|
||||
virtual ~TCPSocket();
|
||||
|
||||
SocketState getState() { return state_; }
|
||||
|
||||
int getSocketFD() { return socket_fd_; }
|
||||
SocketState getState()
|
||||
{
|
||||
return state_;
|
||||
}
|
||||
|
||||
int getSocketFD()
|
||||
{
|
||||
return socket_fd_;
|
||||
}
|
||||
bool setSocketFD(int socket_fd);
|
||||
|
||||
std::string getIP();
|
||||
|
||||
bool read(uint8_t* buf, size_t buf_len, size_t &read);
|
||||
bool write(const uint8_t* buf, size_t buf_len, size_t &written);
|
||||
bool read(uint8_t *buf, size_t buf_len, size_t &read);
|
||||
bool write(const uint8_t *buf, size_t buf_len, size_t &written);
|
||||
|
||||
void close();
|
||||
void close();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user