Package classes

Examples of classes.Adress


*
* **/
public class Server {
  public static void main(String[] ar) throws IOException {
     //Connection adresses
     Adress _connAdress = new Adress(6000,"127.0.0.2");
     //Server interaction
     ServerUserList _sui = new ServerUserList();
    
     //Print connections params
     //System.out.println("Server: connection's params ");
     //_connAdress.printInfo();
    
     ServerSocket _servSocket = new ServerSocket(_connAdress.getPort());
     System.out.println("Server: server started");
     try {
       while (true) {
         Socket _socket = _servSocket.accept();
             try {
View Full Code Here


*
* **/
public class MultiClient {
    public static void main(String[] ar) {
      //Connection adresses
      Adress _connAdress = new Adress(6000,"127.0.0.2");
     
      //System.out.println("Client: connection's params ");
     //Print connections params
     //_connAdress.printInfo();

      try {
            Socket _socket = new Socket(_connAdress.getIPAdress(), _connAdress.getPort()); // ������� ����� ��������� IP-����� � ���� �������.
           
            // Take in/output sreams
            InputStream _inputStream = _socket.getInputStream();
            OutputStream _outputStream = _socket.getOutputStream();

View Full Code Here

TOP

Related Classes of classes.Adress

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.