how to increase TCP window size in android for FTP? -
i trying develop simple ftp client using open source ftp4j library android. wanted know if there way can change/increase tcp window size data transfer. have tried changing receive buffer size on data socket, when checked wireshark logs window size not changing @ all, stays around 195232.
protected socket tcpconnectfordatatransferchannel(string host, int port) throws ioexception { socket socket = new socket(); int size = (1024*1024); socket.setsotimeout(readtimeout * 1000); socket.setsolinger(true, closetimeout); socket.setreceivebuffersize(size); socket.setsendbuffersize(size); socket.connect(new inetsocketaddress(host, port), connectiontimeout * 1000); log.d(tag,string.valueof(socket.getreceivebuffersize())); return socket; }
thanks
you've done it. setting receive buffer size determines maximum receive window. platform free adjust size requested or down. check after set see value kernel gave you.
195232 pretty decent size. there's no advantage making larger bandwidth-delay product.
Comments
Post a Comment