Skip to content

Commit

Permalink
Forgot SOL_SOCKET
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Feb 24, 2020
1 parent c23cdd1 commit 1095bb0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/transmitmedia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -752,8 +752,8 @@ SocketOption udp_options [] {
{ "iptos", IPPROTO_IP, IP_TOS, SocketOption::PRE, SocketOption::INT, nullptr },
// IP_TTL and IP_MULTICAST_TTL are handled separately by a common option, "ttl".
{ "mcloop", IPPROTO_IP, IP_MULTICAST_LOOP, SocketOption::PRE, SocketOption::INT, nullptr },
{ "sndbuf", 0, SO_SNDBUF, SocketOption::PRE, SocketOption::INT, nullptr},
{ "rcvbuf", 0, SO_RCVBUF, SocketOption::PRE, SocketOption::INT, nullptr}
{ "sndbuf", SOL_SOCKET, SO_SNDBUF, SocketOption::PRE, SocketOption::INT, nullptr},
{ "rcvbuf", SOL_SOCKET, SO_RCVBUF, SocketOption::PRE, SocketOption::INT, nullptr}
};

static inline bool IsMulticast(in_addr adr)
Expand Down Expand Up @@ -908,7 +908,7 @@ class UdpCommon
int rcvbuf_size = 65536;
socklen_t rcvbuf_len = sizeof(int);
::getsockopt(m_sock, SOL_SOCKET, SO_RCVBUF, (char*)&rcvbuf_size, &rcvbuf_len);
::cout << "UDP old SO_RCVBUF: " << rcvbuf_size;
::cout << "UDP old SO_RCVBUF: " << rcvbuf_size << ::endl;

m_options = attr;

Expand All @@ -925,7 +925,7 @@ class UdpCommon
}

::getsockopt(m_sock, SOL_SOCKET, SO_RCVBUF, (char*)&rcvbuf_size, &rcvbuf_len);
::cout << "UDP new SO_RCVBUF: " << rcvbuf_size;
::cout << "UDP new SO_RCVBUF: " << rcvbuf_size << ::endl;
}

void Error(int err, string src)
Expand Down

0 comments on commit 1095bb0

Please sign in to comment.