{"in":{"data":"#include \u003csock.h\u003e\nif (recvfrom(s, (char*)\u0026ms, sizeof(ms), 0, foo, bar) \u003e= 0) //receive initial message frame\n{\n\tf++;\n\tif (f == snwseq) //if its the right sequence\n\t{\n\t\tif (sendto(s, (char*)\u0026a, sizeof(a), 0, foo, bar) \u003e 0) //Send ACK\n\t\t\tlog \u003c\u003c \"Send ACK \" \u003c\u003c snwseq \u003c\u003c \".\\n\";\n\t\telse\n\t\t\tcout \u003c\u003c \"Error!\" \u003c\u003c endl;\n\t}\n\telse //wrong sequence\n\t{\n\t\treceive_packet_transfer(s, a, sa, f, slen, snwseq, num); //wait for correct packet\n\t}\n}\nelse\n\tcout \u003c\u003c \"Error!\" \u003c\u003c endl;\n","type":"cpp"},"out":{"data":"#include \u003csock.h\u003e\nif (recvfrom(s, (char*)\u0026ms, sizeof(ms), 0, foo, bar) \u003e= 0) {\n\t// receive initial message frame\n\tf++;\n\tif (f == snwseq) {\n\t\t// if its the right sequence\n\t\tif (sendto(s, (char*)\u0026a, sizeof(a), 0, foo, bar) \u003e 0) {\n\t\t\t// Send ACK\n\t\t\tlog \u003c\u003c \"Send ACK \" \u003c\u003c snwseq \u003c\u003c \".\\n\";\n\t\t} else {\n\t\t\tcout \u003c\u003c \"Error!\" \u003c\u003c endl;\n\t\t}\n\t} else {\n\t\t// wrong sequence\n\t\treceive_packet_transfer(s, a, sa, f, slen, snwseq, num);\n\t}\n} else {\n\tcout \u003c\u003c \"Error!\" \u003c\u003c endl;\n}\n","type":"cpp"},"client":"0.5.0"}