04-04-2005 04:08 PM
04-04-2005 04:24 PM
04-04-2005 04:26 PM
04-05-2005 06:12 AM - edited 04-05-2005 06:12 AM
Message Edited by gilsonap on 04-05-2005 06:13 AM
Message Edited by gilsonap on 04-05-2005 06:13 AM
04-05-2005 06:59 AM
04-05-2005 08:51 AM
04-05-2005 12:23 PM
04-05-2005 01:57 PM
05-14-2018 05:08 PM
Hello, did you get to know how to parse data from labview to java ... could you please help !
05-14-2018 06:25 PM
And i forgot to mention that server and client are able to connect to the same port and on localhost but when i pass a constant string, in java i can't read it.
Here's my code
public class Test
{
private static Socket socket;
public static void main(String[] args)
{
try
{
int port = 8006;
ServerSocket serverSocket = new ServerSocket(port);
System.out.println("Server Started and listening to the port 2018");
//Server is running always. This is done using this while(true) loop
while(true)
{
//Reading the message from the client
socket = serverSocket.accept();
System.out.println(socket);
BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
String data = br.readLine();
System.out.println("Message received from client is "+data);
}
}
catch (Exception e)
{
e.printStackTrace();
}
finally
{
try
{
socket.close();
}
catch(Exception e){}
}
}