Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Creating simple bluetooth server
Creating simple bluetooth server [message #1725795] Mon, 07 March 2016 17:17 Go to next message
Lewis Gibson is currently offline Lewis GibsonFriend
Messages: 1
Registered: March 2016
Junior Member
Hi,

As the name suggest I am trying to make a simple bluetooth server that listen to the input socket and display the string.

The server is able to connect with the client and listen for data transferred, but its is unable to display the string during running. Only after the connection has been closed then all the messages sent is displayed at once in a single line.

This is the code I found and using to get the string.
in = new BufferedReader(new InputStreamReader(channel.openInputStream()));
while ((inputL=in.readLine())!=null)
{
 System.out.println(inputL);
}


So is there any way I can get it to display each line of string sent while still connected?

Thanks
Re: Creating simple bluetooth server [message #1725797 is a reply to message #1725795] Mon, 07 March 2016 17:22 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3880
Registered: July 2009
Senior Member

The first thing that comes to mind is to just not use a BufferedReader. The second is that this isn't specific to Eclipse (it's really just a Java question as you've asked it), and reaches a better audience at places like StackOverflow.

Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:}; significance
Next Topic:Python Console
Goto Forum:
  


Current Time: Mon Oct 26 14:18:56 GMT 2020

Powered by FUDForum. Page generated in 0.04464 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top