Advertisement
Guest User

Connection.class

a guest
Aug 18th, 2014
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.75 KB | None | 0 0
  1. package main;
  2.  
  3. import java.io.ObjectInputStream;
  4. import java.io.ObjectOutputStream;
  5. import java.net.Socket;
  6. import java.util.HashMap;
  7.  
  8. public class Connection extends Socket {
  9.    
  10.     String username;
  11.     ObjectOutputStream output;
  12.     ObjectInputStream input;
  13.     Socket connection;
  14.        
  15.     public Connection(String username ,Socket connection, ObjectOutputStream output, ObjectInputStream input)
  16.     {          
  17.             username = this.username;
  18.             output = this.output;
  19.             input = this.input;
  20.             connection = this.connection;
  21.     }
  22.    
  23.     public Socket getSocket()
  24.     {
  25.         return connection;
  26.     }
  27.    
  28.     public ObjectOutputStream getOutput()
  29.     {
  30.         return output;
  31.     }
  32.     public ObjectInputStream getInput()
  33.     {
  34.         return input;
  35.     }
  36.     public String getUsername()
  37.     {
  38.         return username;
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement