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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? connectiondata.java

?? java telnet 服務(wù)器實(shí)現(xiàn) .
?? JAVA
字號(hào):
//License/*** * Java TelnetD library (embeddable telnet daemon) * Copyright (c) 2000-2005 Dieter Wimberger  * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the author nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. *   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE  * POSSIBILITY OF SUCH DAMAGE. ***/package net.wimpi.telnetd.net;import java.net.InetAddress;import java.net.Socket;import java.util.HashMap;import java.util.Locale;/** * An utility class that is used to store and allow retrieval * of all data associated with a connection. * * @author Dieter Wimberger * @version 2.0 (16/07/2006) * @see net.wimpi.telnetd.net.Connection */public class ConnectionData {  //Associations  private ConnectionManager m_CM;		//the connection's ConnectionManager  private Socket m_Socket;			    //the connection's socket  private InetAddress m_IP;				  //the connection's IP Address Object  private HashMap m_Environment;  //the environment  //Members  private String m_HostName;						//cache for the hostname  private String m_HostAddress;						//cache for the host ip  private int m_Port;								//port of the connection  private Locale m_Locale;						//locale of the connection  private long m_LastActivity;						//timestamp for the last activity  private boolean m_Warned;							//warned flag  private String m_NegotiatedTerminalType;			//negotiated TerminalType as String  private int[] m_TerminalGeometry;					//negotiated terminal geometry  private boolean m_TerminalGeometryChanged = true;	//flag for changes in the terminal geometry  private String m_LoginShell;       //the login shell  private boolean m_LineMode = false;  private String m_EchoMode = "server";  /**   * Constructs a ConnectionData instance storing vital   * information about a connection.   *   * @param sock Socket of the inbound connection.   */  public ConnectionData(Socket sock, ConnectionManager cm) {    m_Socket = sock;    m_CM = cm;    m_IP = sock.getInetAddress();    setHostName();    setHostAddress();    setLocale();    m_Port = sock.getPort();    //this will set a default geometry and terminal type for the terminal    m_TerminalGeometry = new int[2];    m_TerminalGeometry[0] = 80;	//width    m_TerminalGeometry[1] = 25;	//height    m_NegotiatedTerminalType = "default";    m_Environment = new HashMap(20);    //this will stamp the first activity for validity :)    activity();  }//ConnectionData  /**   * Returns a reference to the ConnectionManager the   * connection is associated with.   *   * @return Reference to the associated ConnectionManager.   * @see net.wimpi.telnetd.net.ConnectionManager   */  public ConnectionManager getManager() {    return m_CM;  }//getManager  /**   * Returns a reference to the socket the Connection   * is associated with.   *   * @return Reference to the associated Socket.   * @see java.net.Socket   */  public Socket getSocket() {    return m_Socket;  }//getSocket  /**   * Returns the remote port to which the socket is connected.   *   * @return String that contains the remote port number to which the socket is connected.   */  public int getPort() {    return m_Port;  }//getPort  /**   * Returns the fully qualified host name for the connection's IP address.<br>   * The name is cached on creation for performance reasons. Subsequent calls   * will not result in resolve queries.   *   * @return String that contains the fully qualified host name for this address.   */  public String getHostName() {    return m_HostName;  }//getHostName  /**   * Returns the IP address of the connection.   *   * @return String that contains the connection's IP address.<br>   *         The format "%d.%d.%d.%d" is well known, where %d goes from zero to 255.   */  public String getHostAddress() {    return m_HostAddress;  }//getHostAddress  /**   * Returns the InetAddress object associated with the connection.   *   * @return InetAddress associated with the connection.   */  public InetAddress getInetAddress() {    return m_IP;  }//getInetAddress  /**   * Returns the Locale object associated with the connection   * by carrying out a simple domain match. <br>   * This can either be effective, if your users are really   * home in the country they are connecting from,   * or ineffective if they are on the move getting connected   * from anywhere in the world.<br>   * <br>   * Yet this gives the chance of capturing a default locale   * and starting from some point. On application context   * this can be by far better handled, so be aware that   * it makes sense to spend some thoughts on that thing when you   * build your application.   *   * @return the Locale object "guessed" for the connection based   *         on its host name.   */  public Locale getLocale() {    return m_Locale;  }//getLocale  /**   * Returns a timestamp of the last activity that happened on   * the associated connection.   *   * @return the timestamp as a long representing the difference,   *         measured in milliseconds, between the current time and   *         midnight, January 1, 1970 UTC.   */  public long getLastActivity() {    return m_LastActivity;  }//getLastActivity  /**   * Sets a new timestamp to the actual time in millis   * retrieved from the System. This will remove an idle warning   * flag if it has been set. Note that you can use this behaviour   * to implement your own complex idle timespan policies within   * the context of your application.<br>   * The check frequency of the ConnectionManager should just be set   * according to the lowest time to warning and time to disconnect   * requirements.   */  public void activity() {    m_Warned = false;    m_LastActivity = System.currentTimeMillis();  }//setLastActivity  /**   * Sets the state of the idle warning flag.<br>   * Note that this method will also update the   * the timestamp if the idle warning flag is removed,   * which means its kind of a second way to achieve the   * same thing as with the activity method.   *   * @param bool true if a warning is to be issued,   *             false if to be removed.   * @see #activity()   */  public void setWarned(boolean bool) {    m_Warned = bool;    if (!bool) {      m_LastActivity = System.currentTimeMillis();    }  }//setWarned  /**   * Returns the state of the idle warning flag, which   * will be true if a warning has been issued, and false   * if not.   *   * @return the state of the idle warning flag.   */  public boolean isWarned() {    return m_Warned;  }//isWarned  /**   * Sets the terminal geometry data.<br>   * <em>This method should not be called explicitly   * by the application (i.e. the its here for the io subsystem).</em><br>   * A call will set the terminal geometry changed flag.   *   * @param width  of the terminal in columns.   * @param height of the terminal in rows.   */  public void setTerminalGeometry(int width, int height) {    m_TerminalGeometry[0] = width;    m_TerminalGeometry[1] = height;    m_TerminalGeometryChanged = true;  }//setTerminalGeometry  /**   * Returns the terminal geometry in an array of two integers.   * <ul>   * <li>index 0: Width in columns.   * <li>index 1: Height in rows.   * </ul>   * A call will reset the terminal geometry changed flag.   *   * @return integer array containing width and height.   */  public int[] getTerminalGeometry() {    //we toggle the flag because the change should now be known    if (m_TerminalGeometryChanged) m_TerminalGeometryChanged = false;    return m_TerminalGeometry;  }//getTerminalGeometry  /**   * Returns the width of the terminal in columns for convenience.   *   * @return the number of columns.   */  public int getTerminalColumns() {    return m_TerminalGeometry[0];  }//getTerminalColumns  /**   * Returns the height of the terminal in rows for convenience.   *   * @return the number of rows.   */  public int getTerminalRows() {    return m_TerminalGeometry[1];  }//getTerminalRows  /**   * Returns the state of the terminal geometry changed flag,   * which will be true if it has been set, and false   * if not.   *   * @return the state of the terminal geometry changed flag.   */  public boolean isTerminalGeometryChanged() {    return m_TerminalGeometryChanged;  }//isTerminalGeometryChanged  /**   * Sets the terminal type that has been negotiated   * between telnet client and telnet server, in form of   * a String.<br>   * <p/>   * <em>This method should not be called explicitly   * by the application (i.e. the its here for the io subsystem).</em><br>   *   * @param termtype the negotiated terminal type as String.   */  public void setNegotiatedTerminalType(String termtype) {    m_NegotiatedTerminalType = termtype;  }//setNegotiatedTerminalType  /**   * Returns the terminal type that has been negotiated   * between the telnet client and the telnet server, in   * of a String.<br>   *   * @return the negotiated terminal type as String.   */  public String getNegotiatedTerminalType() {    return m_NegotiatedTerminalType;  }//getNegotiatedTerminalType  /**   * Returns the hashmap for storing and   * retrieving environment variables to be passed   * between shells.   *   * @return a <tt>HashMap</tt> instance.   */  public HashMap getEnvironment() {    return m_Environment;  }//getEnvironment  /**   * Sets the login shell name.   *   * @param s the shell name as string.   */  public void setLoginShell(String s) {    m_LoginShell = s;  }//setLoginShell  /**   * Returns the login shell name.   *   * @return the shell name as string.   */  public String getLoginShell() {    return m_LoginShell;  }//getLoginShell  /**   * Tests if in line mode.   *   * @return true if in line mode, false otherwise   */  public boolean isLineMode() {    return m_LineMode;  }//isLineMode  /**   * Sets the line mode flag for the connection.   * Note that the setting will only be used at   * startup at the moment.   *   * @param b true if to be initialized in linemode,   *          false otherwise.   */  public void setLineMode(boolean b) {    m_LineMode = b;  }//setLineMode  /**   * Mutator for HostName cache   */  private void setHostName() {    m_HostName = m_IP.getHostName();  }//setHostName  /**   * Mutator for HostAddress cache   */  private void setHostAddress() {    m_HostAddress = m_IP.getHostAddress();  }//setHostAddress  /**   * Mutator for Locale   * Sets a Locale derived from the hostname,   * or the default which is Locale.ENGLISH if something   * goes wrong.   * The localhost represents a problem for example :)   */  private void setLocale() {    String country = getHostName();    try {      country = country.substring(country.lastIndexOf(".") + 1);      if (country.equals("at")) {        m_Locale = new Locale("de", "AT");        return;      } else if (country.equals("de")) {        m_Locale = new Locale("de", "DE");        return;      } else if (country.equals("mx")) {        m_Locale = new Locale("es", "MX");        return;      } else if (country.equals("es")) {        m_Locale = new Locale("es", "ES");        return;      } else if (country.equals("it")) {        m_Locale = Locale.ITALY;        return;      } else if (country.equals("fr")) {        m_Locale = Locale.FRANCE;        return;      } else if (country.equals("uk")) {        m_Locale = new Locale("en", "GB");        return;      } else if (country.equals("arpa")) {        m_Locale = Locale.US;        return;      } else if (country.equals("com")) {        m_Locale = Locale.US;        return;      } else if (country.equals("edu")) {        m_Locale = Locale.US;        return;      } else if (country.equals("gov")) {        m_Locale = Locale.US;        return;      } else if (country.equals("org")) {        m_Locale = Locale.US;        return;      } else if (country.equals("mil")) {        m_Locale = Locale.US;        return;      } else {        //default to english        m_Locale = Locale.ENGLISH;      }    } catch (Exception ex) {      //default to english      m_Locale = Locale.ENGLISH;    }  }//setLocale}//class ConnectionData

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区影视| 韩国一区二区在线观看| 国产拍欧美日韩视频二区| 日韩亚洲欧美在线| 欧美sm美女调教| 久久免费的精品国产v∧| 久久久久国产一区二区三区四区| 亚洲精品一区二区精华| 国产无人区一区二区三区| 久久久久久久久伊人| 久久久亚洲精品一区二区三区 | 色先锋资源久久综合| 成人a区在线观看| 在线一区二区视频| 欧美日韩国产成人在线91| 日韩一区二区电影| 日本一区二区动态图| 综合欧美一区二区三区| 亚洲香蕉伊在人在线观| 麻豆精品国产传媒mv男同| 粉嫩一区二区三区在线看| 一本大道综合伊人精品热热 | 91视视频在线直接观看在线看网页在线看| 国产成人久久精品77777最新版本| 波多野结衣亚洲一区| 91久久精品日日躁夜夜躁欧美| 欧美日韩中文国产| 久久精品视频一区| 亚洲一区日韩精品中文字幕| 视频一区中文字幕国产| 高清不卡在线观看av| 精品1区2区3区| 国产清纯在线一区二区www| 亚洲一区二区免费视频| 国产麻豆一精品一av一免费| 色欧美片视频在线观看在线视频| 69精品人人人人| 18涩涩午夜精品.www| 免费成人在线网站| 日本韩国欧美三级| 精品国产精品网麻豆系列| 亚洲日本一区二区| 黄色日韩网站视频| 欧美日韩激情一区| 日韩伦理电影网| 激情久久五月天| 欧美酷刑日本凌虐凌虐| 国产女人18毛片水真多成人如厕| 午夜亚洲福利老司机| 成人黄色av电影| 久久久99久久| 久久99在线观看| 在线播放91灌醉迷j高跟美女| 国产日韩三级在线| 狠狠色狠狠色合久久伊人| 欧美亚洲国产一区在线观看网站| 中文字幕欧美日韩一区| 韩国成人在线视频| 欧美一级片在线| 视频在线观看一区| 欧美日韩成人在线| 亚洲国产成人av好男人在线观看| av一区二区三区在线| 26uuu精品一区二区| 蜜臀a∨国产成人精品| 91精品国产综合久久久久久久久久| 最近中文字幕一区二区三区| 成人午夜视频网站| 国产欧美日韩另类一区| 国产传媒日韩欧美成人| 亚洲国产精品成人综合色在线婷婷| 激情国产一区二区| 国产亚洲欧美中文| 国产成a人无v码亚洲福利| 久久久777精品电影网影网| 国产乱码一区二区三区| 国产性色一区二区| 丁香婷婷综合激情五月色| 久久精品视频在线看| 成人手机在线视频| 亚洲视频中文字幕| 欧洲视频一区二区| 亚洲成人一二三| 欧美一级久久久久久久大片| 久久91精品久久久久久秒播| 精品粉嫩aⅴ一区二区三区四区| 韩国v欧美v日本v亚洲v| 欧美国产一区在线| 91丨porny丨户外露出| 亚洲国产婷婷综合在线精品| 欧美日韩一区中文字幕| 蜜臀精品一区二区三区在线观看| 欧美成人激情免费网| 国产不卡视频一区| 亚洲一区在线视频| 日韩欧美一二三区| 福利一区在线观看| 亚洲精品久久久久久国产精华液| 欧美三级午夜理伦三级中视频| 丝瓜av网站精品一区二区| 久久久99久久精品欧美| 99国产精品久久久久| 午夜精品免费在线观看| 久久久久国产精品厨房| 色综合 综合色| 奇米综合一区二区三区精品视频| 久久久国产午夜精品| 色综合久久中文综合久久97| 日韩电影在线观看一区| 日本一区二区三区高清不卡| 色www精品视频在线观看| 麻豆91精品91久久久的内涵| 欧美国产日产图区| 欧美老女人第四色| 99久久99久久精品国产片果冻| 丝袜美腿亚洲一区二区图片| 国产精品婷婷午夜在线观看| 91精品国产综合久久蜜臀| 成人免费看的视频| 青青草97国产精品免费观看| 最新国产成人在线观看| 久久综合色综合88| 精品视频在线免费观看| 国产91精品欧美| 久久国产精品99久久久久久老狼| 亚洲同性同志一二三专区| 精品国产91亚洲一区二区三区婷婷| 91欧美激情一区二区三区成人| 蜜桃久久久久久| 亚洲成人av在线电影| 亚洲女女做受ⅹxx高潮| 国产人妖乱国产精品人妖| 日韩精品一区二区三区在线 | 精品亚洲成av人在线观看| 亚洲综合在线第一页| 国产精品午夜在线| 日韩美一区二区三区| 欧美日韩在线综合| 色综合久久88色综合天天免费| 国产美女在线观看一区| 老汉av免费一区二区三区| 亚洲va韩国va欧美va精品| 亚洲美女视频在线| 亚洲手机成人高清视频| 《视频一区视频二区| 国产三级精品三级| 欧美国产激情二区三区| 久久久久久一二三区| 欧美第一区第二区| 精品日韩一区二区| 精品久久久久一区| 久久嫩草精品久久久精品一| 久久亚洲私人国产精品va媚药| 精品黑人一区二区三区久久 | 国产成人在线网站| 国产综合色产在线精品| 国产麻豆成人传媒免费观看| 国产精品小仙女| 福利一区二区在线| youjizz国产精品| 色综合久久久久综合体| 在线影院国内精品| 欧美日本乱大交xxxxx| 欧美精品xxxxbbbb| 日韩欧美国产三级电影视频| 欧美成人精品二区三区99精品| 精品国产乱码久久久久久久| 国产午夜亚洲精品理论片色戒 | 国产亚洲一区二区三区四区| 国产午夜精品一区二区| 日本一区二区三区dvd视频在线| 中文字幕一区二区三| 亚洲综合偷拍欧美一区色| 蜜臀a∨国产成人精品| 高清不卡一二三区| 在线观看网站黄不卡| 91精品国产乱码久久蜜臀| 久久蜜桃av一区二区天堂| 综合色中文字幕| 麻豆免费看一区二区三区| 国产aⅴ综合色| 在线观看亚洲a| 久久久久久久久久久黄色| 亚洲欧美在线高清| 免费日韩伦理电影| 成人精品在线视频观看| 欧美日韩中文国产| 亚洲国产精品二十页| 视频一区二区三区入口| 懂色av一区二区三区免费观看| 欧美视频第二页| 国产欧美一区二区精品性| 亚洲成在线观看| 成人在线视频一区| 这里是久久伊人| 国产精品大尺度| 激情成人综合网| 制服.丝袜.亚洲.另类.中文| 欧美国产日韩a欧美在线观看| 青青青伊人色综合久久|