Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LARN
PRRT
Commits
ef8b260e
Commit
ef8b260e
authored
Mar 08, 2016
by
Andreas Schmidt
Browse files
Adapt recv/send programs.
parent
857f5de3
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/receiver.c
View file @
ef8b260e
...
...
@@ -36,7 +36,7 @@ int main(int argc, char* const argv[]) {
continue
;
}
buffer
[
n
]
=
'\0'
;
printf
(
"[B (n: %3d, i: %3d)] %s"
,
n
,
i
,
buffer
);
//
printf("[B (n: %3d, i: %3d)] %s", n, i, buffer);
i
++
;
usleep
(
1
);
}
...
...
src/sender.c
View file @
ef8b260e
...
...
@@ -33,7 +33,7 @@ int main(int argc, char *const argv) {
size_t
len
=
0
;
int
j
=
0
;
int
rounds
=
1
;
int
rounds
=
1
0
;
while
(
j
<
rounds
)
{
fp
=
fopen
(
"/opt/in.txt"
,
"r"
);
...
...
@@ -53,8 +53,9 @@ int main(int argc, char *const argv) {
if
(
line
)
free
(
line
);
usleep
(
1000
*
1000
);
usleep
(
1000
*
1000
*
10
);
PrrtSocket_close
(
socket
);
free
(
socket
);
printf
(
"COMPLETELY CLOSED
\n
"
);
return
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment