Skip to content

Commit 32811d5

Browse files
committed
Final
1 parent f2f1179 commit 32811d5

File tree

7 files changed

+1
-826
lines changed

7 files changed

+1
-826
lines changed

go-back-n/Report.pdf

129 KB
Binary file not shown.

go-back-n/gbn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ ssize_t gbn_send(int sockfd, const void *buf, size_t len, int flags){
117117
if(status!=-1 ){
118118
if(packet->type==DATAACK){
119119
printf("INFO: ACK received requesting packet %d\n",packet->seqnum);
120-
if(packet->seqnum>state.seq_base){
120+
if(packet->seqnum>state.seq_base||(packet->seqnum == 1 && state.seq_base== DATALEN-state.win_size+1)){
121121
alarm(0);
122122
state.seq_max=packet->seqnum+state.win_size-1;
123123
state.seq_base=packet->seqnum;

go-back-n/gbn.o

96 Bytes
Binary file not shown.

go-back-n/output

-2.08 MB
Binary file not shown.

0 commit comments

Comments
 (0)