X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=stream.c;h=b97a670e77a10f78c5750c0c6ee9afd88b8f02b7;hb=00aca7d3f73b593d2b08b0849ca7eb51574de507;hp=1a150e1a8f8575a6e74676cbc4a4dbfa8db08a33;hpb=f820c424539e0d20c7befdfc04412d9acd29614a;p=my-code%2Fivac.git diff --git a/stream.c b/stream.c index 1a150e1..b97a670 100644 --- a/stream.c +++ b/stream.c @@ -26,6 +26,9 @@ /* read, close */ #include +/* defines ... */ +#define MAX_SIZE 1000 + 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) { - 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); }