Saturday, 15 June 2013

What is the maximum limit of data that can be written on SSL socket in one shot in java? -



What is the maximum limit of data that can be written on SSL socket in one shot in java? -

i writing 10000 bytes on ssl socket in 1 shot taking outputstream instance it

outputstrem os = ssl_socket.getoutputstream();

os outputstream here. writes info server, info received @ server end getting corrupted somehow.

but if utilize bufferedoutputstream everthing works fine.

os = new bufferedoutputstream(c._s.getoutputstream(), 8196);

my question :

is there limit on info can written on ssl socket in 1 shot ? there default buffer size ? why worked bufferedoutputstream ? since have write big chunk of info don't want utilize bufferedoutputstream ?

is there limit on info can written on ssl socket in 1 shot?

there no limit other integer.max_value. sslsocket's output stream block until info has been sent, including encryption , packaging requisite number of underlying ssl records.

is there default buffer size?

bufferedoutputstream has default buffer size of 8192. 8196 curious number utilize buffer size, should utilize buffered stream or author on sslsocket's output stream. otherwise can info explosion of 42 times, if write byte @ time

why worked bufferedoutputstream ? since have write big chunk of info don't want utilize bufferedoutputstream?

you don't have utilize bufferedoutputstream, doesn't hurt, if you're writing big chunks of data. buffer bypassed when possible.

your problems @ receiving end.

java sockets ssl io

No comments:

Post a Comment