aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Socket.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2022-03-29 19:00:25 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2022-03-29 19:00:25 +0200
commit5269fec9106327db4ada313701ceae67d833e736 (patch)
tree30698b7aa8227af14addcfe214a08a7b0983d05d /lib/Socket.h
parent4fa485c237e48a2edb8c804b2abbdbb7e033dfc9 (diff)
downloadODR-SourceCompanion-5269fec9106327db4ada313701ceae67d833e736.tar.gz
ODR-SourceCompanion-5269fec9106327db4ada313701ceae67d833e736.tar.bz2
ODR-SourceCompanion-5269fec9106327db4ada313701ceae67d833e736.zip
Common: log timestamps and socket changes
Diffstat (limited to 'lib/Socket.h')
-rw-r--r--lib/Socket.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Socket.h b/lib/Socket.h
index 08607a5..f5143a0 100644
--- a/lib/Socket.h
+++ b/lib/Socket.h
@@ -115,6 +115,7 @@ class UDPSocket
void close(void);
void send(UDPPacket& packet);
void send(const std::vector<uint8_t>& data, InetAddress destination);
+ void send(const std::string& data, InetAddress destination);
UDPPacket receive(size_t max_size);
void joinGroup(const char* groupname, const char* if_addr = nullptr);
void setMulticastSource(const char* source_addr);
@@ -198,6 +199,8 @@ class TCPSocket {
*/
ssize_t recv(void *buffer, size_t length, int flags, int timeout_ms);
+ SOCKET get_sockfd() const { return m_sock; }
+
private:
explicit TCPSocket(int sockfd);
explicit TCPSocket(int sockfd, InetAddress remote_address);