projects
/
my-code
/
ivac.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moved to minirgb
[my-code/ivac.git]
/
stream.c
diff --git
a/stream.c
b/stream.c
index
da6cc47
..
1a150e1
100644
(file)
--- a/
stream.c
+++ b/
stream.c
@@
-70,10
+70,11
@@
int main(int argc, char *argv[]) {
while(read_bytes>0) {
unsigned char buf[1000];
read_bytes=read(0,buf,sizeof(buf));
while(read_bytes>0) {
unsigned char buf[1000];
read_bytes=read(0,buf,sizeof(buf));
- send_bytes=send(send_fd,buf,
sizeof(buf)
,0);
+ send_bytes=send(send_fd,buf,
read_bytes
,0);
}
close(send_fd);
}
close(send_fd);
+ close(listen_fd);
printf("connection closed ...\n");
printf("%d from %d total bytes sent.\n",send_bytes,read_bytes);
}
printf("connection closed ...\n");
printf("%d from %d total bytes sent.\n",send_bytes,read_bytes);
}