Anbei mal zwei Beispiel Klassen die ich verwende:
Die xx sind jweils durch die richtigen Werte zu ersetzen.
---------------------------------------------------
import java.io.*;
import java.net.*;
class Power_On {
public static void main(String[] arguments) {
try {
InetAddress SlimServer = InetAddress.getByName("192.168.1.xx");
int SlimCLIPort = 9090;
Socket s = new Socket(SlimServer, SlimCLIPort);
OutputStreamWriter wr = new
OutputStreamWriter(s.getOutputStream());
wr.write("00%3Axx%3Axx%3Axx%3Axx%3Axx power 1" + "\n");
wr.flush();
}
catch (Exception e) {
e.printStackTrace();
}
}
}
---------------------------------------------------
import java.io.*;
import java.net.*;
class Play {
public static void main(String[] arguments) {
try {
InetAddress SlimServer = InetAddress.getByName("192.168.1.xx");
int SlimCLIPort = 9090;
Socket s = new Socket(SlimServer, SlimCLIPort);
OutputStreamWriter wr = new
OutputStreamWriter(s.getOutputStream());
wr.write("00%3Axx%3Axx%3Axx%3Axx%3Axx play" + "\n");
wr.flush();
}
catch (Exception e) {
e.printStackTrace();
}
}
}
--
ZX81
------------------------------------------------------------------------
ZX81's Profile: http://forums.slimdevices.com/member.php?userid=231
View this thread: http://forums.slimdevices.com/showthread.php?t=75846
_______________________________________________
slimserver-de mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/slimserver-de