projects
/
my-code
/
ivac.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4791259
)
added MAX_SIZE 1400
author
hackbard
<hackbard>
Fri, 10 Jan 2003 15:29:45 +0000
(15:29 +0000)
committer
hackbard
<hackbard>
Fri, 10 Jan 2003 15:29:45 +0000
(15:29 +0000)
stream.c
patch
|
blob
|
history
diff --git
a/stream.c
b/stream.c
index
1a150e1
..
2320b13
100644
(file)
--- a/
stream.c
+++ b/
stream.c
@@
-26,6
+26,9
@@
/* read, close */
#include <unistd.h>
/* read, close */
#include <unistd.h>
+/* defines ... */
+#define MAX_SIZE 1400
+
int main(int argc, char *argv[]) {
int listen_fd, send_fd;
struct sockaddr_in local_addr, remote_addr;
int main(int argc, char *argv[]) {
int listen_fd, send_fd;
struct sockaddr_in local_addr, remote_addr;
@@
-68,7
+71,7
@@
int main(int argc, char *argv[]) {
/* send stuff .... */
read_bytes=1;
while(read_bytes>0) {
/* send stuff .... */
read_bytes=1;
while(read_bytes>0) {
- unsigned char buf[
1000
];
+ unsigned char buf[
MAX_SIZE
];
read_bytes=read(0,buf,sizeof(buf));
send_bytes=send(send_fd,buf,read_bytes,0);
}
read_bytes=read(0,buf,sizeof(buf));
send_bytes=send(send_fd,buf,read_bytes,0);
}