I guess your program is buggy, you should sdrecv until it reads 0
byte or the read channel closed by remote side, or you know that
enough data have already arrived.
Вс., 27 янв. 2013, Bob Miller писал(а):
> Hello everyone,
>
> Can you exlpain why when running this line by line in jconsole "data"
> variable contains full page source
> but when i put script source in file, say run.ijs, and run it with "jconsole
> run.ijs" data variable contains only
> first 1448 bytes?
>
> load 'socket' coinsert 'jsocket' socket =: 0 pick sdcheck sdsocket '' jsoft
> =: sdcheck sdgethostbyname 'www.jsoftware.com' sdcheck sdconnect socket ;
> jsoft , < 80 sdcheck ('GET /',CR,LF) sdsend socket,0 data =: ;sdcheck sdrecv
> socket , 10000000 , 0 sdcheck sdclose socket
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm