Answered step by step
Verified Expert Solution
Question
1 Approved Answer
NEED HELP WITH SELECTIVE REPEAT PROTOCOL. PLEASE WRITE CODE IN C++ AND PLEASE DON'T RESPOND UNLESS IT'S THE FULL CODE. DO NOT CHANGE MYFTPCLIENT.C OR
NEED HELP WITH SELECTIVE REPEAT PROTOCOL. PLEASE WRITE CODE IN C++ AND PLEASE DON'T RESPOND UNLESS IT'S THE FULL CODE. DO NOT CHANGE MYFTPCLIENT.C OR MYFTPSERVER.C!! Need to complete the methods in mysr.c and mysr.h. I've been trying to complete this for a long time but still have no clue what to do and need this ASAP, so please help.
Compile include "ayst.h void aysr_init, sender (struct nyst sender aysr sendet, char ip, int port, int N, int tineout) int nyst_send (struet ayst_sender sysrsender, unsigned char* but, int len) ( return 0 void aysr_close sender (struct sysr_sender nysr sender) void nyst init receiver (struct sysr receiver sysr_receiver, int port) int sysr_zeev(struct syst_receiver yst receiver, unsigned char but, int len) t return 0 void mystclose zeceiver (stzuct syst_receivers syst receiver) t ole Compiler Output Find Replace Replaca Witt d Nen Find Previous Find All Temp/RarSDIa21780 2275mysr.c #detine-aysth_ idetine MAX PAYLOAD_SIZE 51:2 truet MYSR Packet { unsigned char protocol( unsigned char type unsigned int seqNum unsigned int length: unsigned chat payload[MAX PAYLOAD SIZE]: /1 protocol string (2 bytes) "st // type (1 byte) // sequence nusber (4 bytes) /7 length (headet+payload) (4 bytes) payload data attribute(packed)) struct ayst sendet t int sd: // SR sender socket other sesber variables i : void ayst.init, sender (struct myst sender myst sendet, chat ip, int port, int N, int timeout): int nyst_send (struct syst sender sysr sendet, unsigned char but, int len) : void #yst-elose-sender (struct lyst-sender. ayar-sender); struct sysr, receiver int sd: I/ SR receiver socket .othet sesber variables l: void sysr_init receiver(struet nyst_zeceiver sysr_receiver, int port) int nyst_recv(struct aysr receiver nyst receiver, unsi void syst_close_receiver (struct myst receivet* ayst receiver) har* but, int len) : fendit nsole Compiler Output FindReplace nd Ned Find Previous Find All syttpserver.c *-A tep server supporting multiple elients include cnetdb.h inelude
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started