----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
Here's a quick sample of the relevant code which I'm pretty sure is OK.
As you can see, I do flush the stream out to the client.
// Input stream from Server application
is = ServerSocketConnection.getInputStream();
s_in = new ObjectInputStream(is);
// Output stream to Client Applet
oc = res.getOutputStream();
c_out = new ObjectOutputStream(oc);
Object server_in = null;
while (listening) {
try {
server_in = s_in.readObject();
}
catch (ClassNotFoundException cnfe) {
listening = false;
}
catch (IOException iocw) {
listening = false;
}
if (server_in instanceof DataUpdateEvent) {
try {
c_out.writeObject((DataUpdateEvent) server_in);
c_out.flush();
}
catch (IOException ioe) {
listening = false;
}
}
} // while
-----Original Message-----
From: Andras Balogh [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 16, 2000 1:15 PM
To: Java Apache Users
Subject: Re: JServ's big packets
----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
Hi,
Have You tried flush() -ing the Object Stream ??
Best wishes,
Andras.
----- Original Message -----
From: "David Briggs" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 16, 2000 12:58 PM
Subject: JServ's big packets
>
> I have a servlet that is called by an applet. The servlet then makes a
> socket connection to a server program which feeds the servlet price
data
> as and when it becomes available. The servlet then sends this data
back
> to the applet via an Object Stream. Initially, I developed this
> application using the Sun JSWDK test engine and it worked fine (until
I
> started adding more users and the engine couldn't cope). JServ however
> only sends the data back to the applet once it totals approx 4.2k -
> which is about 65 data updates worth! I need the data updates to go
> straight to the client when the servlet receives them. The servlet is
> receiving the data correctly, and seems to be writing it to the output
> stream to the client correctly. However the data isn't leaving the
> machine until it reaches the magic 4.2k mark (approx 2 and a half HTTP
> packets). Is it JServ or the Apache Web Server that might be causing
> this, and which ever it is, does anyone have any idea how I can fix it
> to suit my situation? I've looked through all the conf and properties
> files for both programs and have the latest versions.
>
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search Archives:
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search Archives:
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]