⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scan.java

📁 exemple for using java chat client + server
💻 JAVA
字号:
/*
 * scan.java
 *
 * Created on 22 octobre 2008, 20:53
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package TP3;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.Socket;
import java.net.URL;
import java.net.UnknownHostException;

/**
 *
 * @author Administrateur
 */
public class scan {
    
    /** Creates a new instance of scan */
    public scan() {
    }
    public static void main(String [] args)
    {
        String hote ="localhost";
        if(args.length>0)
            hote=args[0];
        String protocole []={"http","ftp","file","Telnet","Ldap"};
        String fichier="";
        for(int i = 135; i<136;i++)
        {
           
              
               for(int j=0;j<protocole.length;j++)
               {
                    try
                {
                         Socket s = new Socket(hote,i) ;
                        // String p = protocole[];
                   URL r = new URL(protocole[j],hote,i,fichier);
                    System.out.println("un serveur est rattach

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -