PORT = 10001;
try 
aSocket=java.net.Socket('localhost',PORT);
aReader =java.io.BufferedReader(java.io.InputStreamReader(getInputStream(aSocket)));
while (1)
    s = readLine(aReader);
	if isempty(s) break;end
    disp(s);
end
close(aReader);
close(aSocket);
catch
 disp('Connection Error');   
end
