This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I'm new to the forums, so I hope this isn't in the wrong place...
I have that "Software caused connection abort: socket write error" exception error that i've never meet before.
Basically what im trying to do is the following: - a client connect to a server using sslsocket. - server receive the connection and reply with the first part of the data and keep the connection open. - then client receive the reply and request for another data using the same socket connection - then server receive the next request and reply with the second part of the data and close the connection when the loop is finish.
what im trying to do is actually to chunk the download size. consider I need to download a 20MB of data from the server, using a single request is fine, but client have to wait for sometime until all the data is downloaded. so im trying to chunk the data into several part, and the server will send the chunk of data one by one. so the moment client receive the first part of the data, it will display it directly and at the same time will process the next data.
creating a new socket request for each chunk of data will be slow since it has to keep open and close the socket to server several times.
so in short, im trying to utilize one socket connection to do several data communication between client and server. can you help point out what i did wrong in doing this..? or a link to any site providing example in doing this..?
Thanking you in advance for your help and sorry for the length of the post..
[kguuy kku:] I'm new to the forums, so I hope this isn't in the wrong place... You are at the right place. [kguuy kku:] sorry for the length of the post.. It is your post, I have tested the waters and have not seen any of the moderators discourage large posts of code where a matter of this consequence is involved. The only time I saw anyone mention large posts was when someone placed a large - repetitive data file listing that could have been inferred from the first and last few lines. Your style is excellent, we have many experienced workers here at Java Ranch who can provide deep insight. Your design approach is excellent, chunking the traffic. // Can we actually send ourselves and then receive ourselves?
You write the Output stream once, then drop into the loop. Makes sense but is this to initiate the transaction stream ? For timing, I would use long time = System.currentTimeMillis(); Parsing dates with SimpleDateFormat would be for display, internal time in code should be handled as a numeric data type.
I have not seen this error message before, are you using a data management package from a vendor? Sockets have what is called keepAlive value, I do not know how to set it but if the error is socket write error: Then we probably should examine whether the SSLException derives from some mechanics of the socket connection.
Again, your posting style is excellent and we have many masters here and few rules. A+ on your post. [ March 14, 2008: Message edited by: Nicholas Jordan ]
"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."