Advertisement
Guest User

Here i create the Connection instance

a guest
Aug 18th, 2014
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1.                     Socket connection = server.accept();
  2.                    
  3.                     ObjectOutputStream output = new ObjectOutputStream(connection.getOutputStream());
  4.                     ObjectInputStream input = new ObjectInputStream(connection.getInputStream());
  5.                    
  6.                     username = (String) input.readObject();
  7.                    
  8.                     output.writeObject("Willkommen!");
  9.                     output.flush();
  10.                    
  11.                     Connection connectionClass = new Connection(username, connection, output, input);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement