]> git.sesse.net Git - greproxy/blobdiff - greprotocol.cpp
Add README and license.
[greproxy] / greprotocol.cpp
index 5fd4e4b8262a69be62098fb41524a2b228b7602f..8a400534a59c52d91343ac7767f1d4247b186c58 100644 (file)
@@ -43,6 +43,12 @@ GREProtocol::GREProtocol(const in6_addr &src, const in6_addr &dst)
                perror("bind");
                exit(1);
        }
+
+       int buf = 10 << 20;  // 20 MB.
+       if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, &buf, sizeof(buf)) == -1) {
+               perror("setsockopt(SO_RCVBUF)");
+               exit(1);
+       }
 }
 
 void GREProtocol::send_packet(uint16_t proto, const string &data, int incoming_seq)