X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=greproxy.cpp;h=127e0a6c72f51f717cc02cc3eb84a84877877f27;hb=9e8a28e92f8e092a2409ddad770b3dbe088a4fe9;hp=fa116b63da7e7175774b584a9751e5c130f3e463;hpb=41f85eb875bcdadec4d6766ae93022ca233eaccf;p=greproxy diff --git a/greproxy.cpp b/greproxy.cpp index fa116b6..127e0a6 100644 --- a/greproxy.cpp +++ b/greproxy.cpp @@ -1,18 +1,13 @@ +#include +#include #include -#include #include +#include #include -#include -#include - -#include -#include -#include #include "greprotocol.h" -#include "protocol.h" #include "reorderer.h" -#include "tunprotocol.h" +#include "rsencoder.h" using namespace std; @@ -32,8 +27,10 @@ int main(int argc, char **argv) in6_addr myaddr = get_addr(argv[3]); GREProtocol gre_a(myaddr, addr_a); GREProtocol gre_b(myaddr, addr_b); - Reorderer dst_a(&gre_a); - Reorderer dst_b(&gre_b); + RSEncoder rs_a(&gre_a); + RSEncoder rs_b(&gre_b); + Reorderer reorder_a(&rs_a); + Reorderer reorder_b(&rs_b); fd_set fds; FD_ZERO(&fds); @@ -47,10 +44,10 @@ int main(int argc, char **argv) } if (FD_ISSET(gre_a.fd(), &fds)) { - gre_a.read_packet(&dst_b); + gre_a.read_packet(&reorder_b); } if (FD_ISSET(gre_b.fd(), &fds)) { - gre_b.read_packet(&dst_a); + gre_b.read_packet(&reorder_a); } } }