Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- die Sender-Klasse:
- public void send(final int arg, final String toSend) throws IOException {
- try {
- out.write(arg);
- Thread.sleep(100);
- out.write(toSend);
- Thread.sleep(100);
- }
- catch(InterruptedException err) {
- }
- }
- Die Receiver-Klasse:
- private String receive() {
- try {
- return in.readLine();
- }
- catch(SocketException err){
- return err.toString() + " (Verbindung zum Server getrennt)";
- }
- catch(Exception err) {
- return err.toString();
- }
- }
Add Comment
Please, Sign In to add comment