Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pcom-laboratoare-public
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PCom
pcom-laboratoare-public
Commits
3dde0d08
Commit
3dde0d08
authored
3 weeks ago
by
Ion-Dorinel FILIP (25005)
Browse files
Options
Downloads
Patches
Plain Diff
Removed already done TODO
parent
1d1b0cee
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lab6/client.c
+3
-5
3 additions, 5 deletions
lab6/client.c
with
3 additions
and
5 deletions
lab6/client.c
+
3
−
5
View file @
3dde0d08
...
@@ -51,9 +51,9 @@ void send_file_start_stop(int sockfd, struct sockaddr_in server_address,
...
@@ -51,9 +51,9 @@ void send_file_start_stop(int sockfd, struct sockaddr_in server_address,
d
.
seq
=
seq
;
d
.
seq
=
seq
;
seq
++
;
seq
++
;
/* TODO 1.
2
: Send the datagram. */
/* TODO 1.
1
: Send the datagram. */
/* TODO 1.
3
: Wait for ACK before moving to the next datagram to send.
/* TODO 1.
2
: Wait for ACK before moving to the next datagram to send.
If timeout or wrong seq number, resend the datagram. */
If timeout or wrong seq number, resend the datagram. */
if
(
n
==
0
)
// end of file
if
(
n
==
0
)
// end of file
...
@@ -74,9 +74,7 @@ void send_file_go_back_n(int sockfd, struct sockaddr_in server_address,
...
@@ -74,9 +74,7 @@ void send_file_go_back_n(int sockfd, struct sockaddr_in server_address,
int
seq
=
1
;
int
seq
=
1
;
while
(
1
)
{
while
(
1
)
{
/* TODO: 1.1 Read all the data of the and add it as datagrams in
/* Read the entire file in chunks and add them into a list of seq_udp (window) */
* datagram_queue */
/* Reads the content of a file */
struct
seq_udp
*
d
=
malloc
(
sizeof
(
struct
seq_udp
));
struct
seq_udp
*
d
=
malloc
(
sizeof
(
struct
seq_udp
));
DIE
(
d
==
NULL
,
"malloc"
);
DIE
(
d
==
NULL
,
"malloc"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment