亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? simpleproxyserver.java

?? 共有164個java源程序
?? JAVA
字號:
/* * Copyright (c) 2000 David Flanagan.  All rights reserved. * This code is from the book Java Examples in a Nutshell, 2nd Edition. * It is provided AS-IS, WITHOUT ANY WARRANTY either expressed or implied. * You may study, use, and modify it for any non-commercial purpose. * You may distribute it non-commercially as long as you retain this notice. * For a commercial use license, or to purchase the book (recommended), * visit http://www.davidflanagan.com/javaexamples2. */package com.davidflanagan.examples.net;import java.io.*;import java.net.*;/** * This class implements a simple single-threaded proxy server. **/public class SimpleProxyServer {    /** The main method parses arguments and passes them to runServer */    public static void main(String[] args) throws IOException {        try {            // Check the number of arguments            if (args.length != 3)                 throw new IllegalArgumentException("Wrong number of args.");	                // Get the command-line arguments: the host and port we are proxy            // for and the local port that we listen for connections on.            String host = args[0];            int remoteport = Integer.parseInt(args[1]);            int localport = Integer.parseInt(args[2]);            // Print a start-up message            System.out.println("Starting proxy for " + host + ":" + 			       remoteport + " on port " + localport);            // And start running the server            runServer(host, remoteport, localport);   // never returns        }         catch (Exception e) {            System.err.println(e);            System.err.println("Usage: java SimpleProxyServer " +			       "<host> <remoteport> <localport>");        }    }        /**     * This method runs a single-threaded proxy server for      * host:remoteport on the specified local port.  It never returns.     **/    public static void runServer(String host, int remoteport, int localport) 	throws IOException {        // Create a ServerSocket to listen for connections with        ServerSocket ss = new ServerSocket(localport);	        // Create buffers for client-to-server and server-to-client transfer.        // We make one final so it can be used in an anonymous class below.        // Note the assumptions about the volume of traffic in each direction.        final byte[] request = new byte[1024];        byte[] reply = new byte[4096];                // This is a server that never returns, so enter an infinite loop.        while(true) {            // Variables to hold the sockets to the client and to the server.            Socket client = null, server = null;            try {                // Wait for a connection on the local port                client = ss.accept();                                // Get client streams.  Make them final so they can                // be used in the anonymous thread below.                final InputStream from_client = client.getInputStream();                final OutputStream to_client = client.getOutputStream();                // Make a connection to the real server.                // If we cannot connect to the server, send an error to the                 // client, disconnect, and continue waiting for connections.                try { server = new Socket(host, remoteport); }                 catch (IOException e) {                    PrintWriter out = new PrintWriter(to_client);                    out.print("Proxy server cannot connect to " + host + ":"+			      remoteport + ":\n" + e + "\n");                    out.flush();                    client.close();                    continue;                }                                // Get server streams.                final InputStream from_server = server.getInputStream();                final OutputStream to_server = server.getOutputStream();                // Make a thread to read the client's requests and pass them                // to the server.  We have to use a separate thread because                // requests and responses may be asynchronous.                Thread t = new Thread() {                    public void run() {                        int bytes_read;                        try {                            while((bytes_read=from_client.read(request))!=-1) {                                to_server.write(request, 0, bytes_read);                                to_server.flush();                            }                        }                        catch (IOException e) {}                        // the client closed the connection to us, so close our                        // connection to the server.  This will also cause the                         // server-to-client loop in the main thread exit.                        try {to_server.close();} catch (IOException e) {}                    }                };                // Start the client-to-server request thread running                t.start();                  // Meanwhile, in the main thread, read the server's responses                // and pass them back to the client.  This will be done in                // parallel with the client-to-server request thread above.                int bytes_read;                try {                    while((bytes_read = from_server.read(reply)) != -1) {                        to_client.write(reply, 0, bytes_read);                        to_client.flush();                    }                }                catch(IOException e) {}                // The server closed its connection to us, so we close our                 // connection to our client.		// This will make the other thread exit.                to_client.close();            }            catch (IOException e) { System.err.println(e); }            finally {  // Close the sockets no matter what happens.                try {                     if (server != null) server.close();                     if (client != null) client.close();                 }                catch(IOException e) {}            }        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线视频国产一区| 精品av久久707| 精品国产一区二区三区忘忧草 | 欧美伊人久久久久久久久影院| 欧美老年两性高潮| 亚洲欧洲在线观看av| 蜜臀久久99精品久久久久久9| 色婷婷综合久久久中文字幕| 精品伦理精品一区| 丝袜美腿亚洲色图| 91视频你懂的| 亚洲三级在线看| 国产福利一区二区三区在线视频| 日本韩国视频一区二区| 国产日产精品一区| 麻豆精品视频在线| 欧美精品久久久久久久多人混战 | 亚洲色图丝袜美腿| 成人免费va视频| 久久综合九色综合久久久精品综合 | 国产传媒欧美日韩成人| 欧美军同video69gay| 亚洲精品ww久久久久久p站| 国产高清不卡一区二区| 2023国产精品| 国产麻豆成人传媒免费观看| 日韩亚洲欧美一区| 男女激情视频一区| 欧美一区二区视频在线观看 | 捆绑调教美女网站视频一区| 欧美日韩一级二级三级| 亚洲一级在线观看| 精品视频在线免费| 天天综合色天天综合| 欧美日韩另类一区| 视频一区中文字幕国产| 欧美日韩黄色影视| 日韩二区在线观看| 91精品啪在线观看国产60岁| 日本不卡1234视频| 日韩精品专区在线影院重磅| 久久精品国产亚洲aⅴ| 久久免费精品国产久精品久久久久 | 久久网这里都是精品| 国产精品一区在线观看乱码 | 成人精品鲁一区一区二区| 亚洲国产精品成人综合色在线婷婷| 国产一区二区三区蝌蚪| 国产精品视频一二| 91久久奴性调教| 日本视频在线一区| 久久看人人爽人人| 91麻豆免费在线观看| 亚洲一区二区三区自拍| 91精品国产综合久久蜜臀| 国产麻豆视频精品| 亚洲精品国产精华液| 欧美一区二区三区成人| 国产激情精品久久久第一区二区| 亚洲欧洲99久久| 制服丝袜日韩国产| 国产91高潮流白浆在线麻豆| 亚洲裸体在线观看| 日韩亚洲欧美在线观看| voyeur盗摄精品| 亚洲va欧美va国产va天堂影院| 欧美大黄免费观看| 99久久国产综合精品麻豆 | 日韩理论片在线| 欧美日本一区二区三区四区| 蜜桃视频一区二区三区在线观看 | 亚洲激情av在线| 精品免费日韩av| 91久久国产最好的精华液| 蜜臀国产一区二区三区在线播放| 国产精品毛片无遮挡高清| 3d动漫精品啪啪| 色香蕉久久蜜桃| 久久超碰97中文字幕| 一区二区免费在线播放| 精品国产一区二区三区久久久蜜月| 91麻豆精品一区二区三区| 久久99精品久久久| 亚洲国产视频直播| 国产精品成人一区二区艾草 | 大白屁股一区二区视频| 午夜av一区二区三区| 亚洲国产精品av| 日韩免费观看高清完整版| 在线精品视频一区二区三四| 国产91在线看| 精品一区二区免费| 天堂午夜影视日韩欧美一区二区| 中文字幕日本不卡| 国产女同互慰高潮91漫画| 日韩你懂的在线播放| 欧美午夜精品免费| 9i在线看片成人免费| 国产一区二区三区免费看| 蜜桃精品在线观看| 五月婷婷激情综合| 一区二区三区产品免费精品久久75| 亚洲国产精品黑人久久久| 久久久不卡影院| 久久中文娱乐网| 精品久久免费看| 欧美α欧美αv大片| 日韩片之四级片| 7777精品伊人久久久大香线蕉最新版| 色综合天天性综合| 色综合色狠狠天天综合色| 91在线看国产| 色综合久久久网| 欧美在线小视频| 欧美日韩国产成人在线91 | 99视频一区二区| 波多野结衣欧美| 99精品久久免费看蜜臀剧情介绍| 成人精品视频.| 色综合久久中文综合久久97 | 亚洲激情自拍偷拍| 亚洲黄色免费网站| 亚洲成a天堂v人片| 亚洲18色成人| 久久国产麻豆精品| 国产主播一区二区| 国产91精品一区二区麻豆网站| 成人激情小说网站| 日本韩国欧美在线| 欧美精品电影在线播放| 欧美成人三级电影在线| 欧美精品一区二区三区在线播放| 久久综合狠狠综合久久综合88| 亚洲精品成人a在线观看| 一区二区三区成人| 美女视频网站久久| 国产成人精品亚洲777人妖| 成+人+亚洲+综合天堂| 欧美综合一区二区三区| 337p亚洲精品色噜噜| 久久日韩粉嫩一区二区三区| 中文字幕日韩一区二区| 亚洲电影欧美电影有声小说| 青青草视频一区| 成人综合在线观看| 91国产视频在线观看| 欧美大片国产精品| 亚洲欧美偷拍卡通变态| 日韩精品欧美成人高清一区二区| 精品一区二区三区av| 色偷偷成人一区二区三区91 | 国产呦精品一区二区三区网站| 成人性生交大片免费看中文 | 99免费精品在线观看| 欧美精品视频www在线观看 | 亚洲欧美日韩国产手机在线 | 亚洲国产精品天堂| 激情综合网激情| 色婷婷激情一区二区三区| 日韩欧美精品在线视频| 欧美极品aⅴ影院| 日本午夜一本久久久综合| 99久久综合精品| 久久这里只有精品6| 亚洲gay无套男同| 成人h动漫精品一区二区| 日韩一区二区精品| 亚洲黄色小视频| 国产成人亚洲综合a∨猫咪| 欧美日韩成人激情| 自拍偷拍欧美激情| 国产一二三精品| 欧美日韩成人在线一区| 亚洲色图一区二区三区| 国产一区二区中文字幕| 欧美精品丝袜中出| 亚洲综合视频在线观看| 北岛玲一区二区三区四区| 欧美成人国产一区二区| 亚洲成在人线免费| 99国产精品国产精品久久| 2020国产精品久久精品美国| 日韩电影在线观看一区| 色婷婷综合久久久久中文| 国产精品天天摸av网| 国产综合色在线视频区| 91精品国产免费| 亚洲福中文字幕伊人影院| 91欧美一区二区| 中文文精品字幕一区二区| 国产在线看一区| 精品久久久久一区| 美国毛片一区二区| 日韩视频不卡中文| 美日韩黄色大片| 欧美一区二区免费观在线| 香蕉乱码成人久久天堂爱免费| 欧美三级电影在线看| 亚洲一区中文在线| 欧美羞羞免费网站|