diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2022-03-29 17:17:58 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2022-03-29 17:17:58 +0200 |
commit | 3873a40d9aa8e51560ac18bfbf0c18c1ff7a30dc (patch) | |
tree | 20903c97199079ad7ecd7df1d6cc919b19bbd267 /contrib/Socket.h | |
parent | 3c6e2aa8afd108ab9f2d517ef2e2aab96f68c7ef (diff) | |
download | ODR-AudioEnc-3873a40d9aa8e51560ac18bfbf0c18c1ff7a30dc.tar.gz ODR-AudioEnc-3873a40d9aa8e51560ac18bfbf0c18c1ff7a30dc.tar.bz2 ODR-AudioEnc-3873a40d9aa8e51560ac18bfbf0c18c1ff7a30dc.zip |
Common: log timestamps and socket changes
Diffstat (limited to 'contrib/Socket.h')
-rw-r--r-- | contrib/Socket.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/Socket.h b/contrib/Socket.h index 08607a5..f5143a0 100644 --- a/contrib/Socket.h +++ b/contrib/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); |