Hello folks, we are developing a client/server java application that relys on bluetooth for exchaning data between 2 mobile phones. The client is connecting to the server over 'rfcomm' and receiving an image from the server of about 50K. For the complete data exchange it takes about 6 seconds, which is really really a lot (this makes a few Kbit/sec data rate..)!!! I'm attaching below the java code we are using.
Suggestions are more than welcome!
Thanks in advance for any help!!
Iacopo
CLIENT: ------------ DataOutputStream dOut = new DataOutputStream(dOut.writeInt(data.length); dOut.write(data); dOut.close();
SERVER: ------------ for (len = din.read(buf); len > 0; len = din.read(buf)) { bout.write(buf, 0, len); } data = bout.toByteArray();
|