X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=greprotocol.cpp;h=8a400534a59c52d91343ac7767f1d4247b186c58;hb=4c15e1ffd081f5e2f7840a6dea58b131c4358533;hp=5fd4e4b8262a69be62098fb41524a2b228b7602f;hpb=8382a720affa71d054eba6761473e7b9fcfb725a;p=greproxy diff --git a/greprotocol.cpp b/greprotocol.cpp index 5fd4e4b..8a40053 100644 --- a/greprotocol.cpp +++ b/greprotocol.cpp @@ -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)