|
123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-
- package kommunikation.transmitter;
-
- import java.io.IOException;
- import java.io.ObjectInputStream;
- import java.io.ObjectOutputStream;
- import java.net.Socket;
-
-
- /**
- *
- * @author Alexander_Christoph
- */
- public class Client extends Kommunikationspartner
- {
-
- public Client()
- {
- this.ip = "127.0.0.0";
- lg.info("Client erstellt");
- }
-
-
- @Override
- public void verbinde()
- {
- try
- {
- Socket s = new Socket(ip, port); // Achtung: blockiert!
- lg.info("Client: socket erstellt");
- out = new ObjectOutputStream(s.getOutputStream());
- in = new ObjectInputStream(s.getInputStream());
- lg.info("Client: Stream initialisiert");
- }
- catch (IOException ex)
- {
- lg.severe(ex.toString());
- }
- }
- }
|