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

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

?? socket.java

?? linux下編程用 編譯軟件
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* Socket.java -- Client socket implementation   Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004   Free Software Foundation, Inc.This file is part of GNU Classpath.GNU Classpath is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2, or (at your option)any later version.GNU Classpath is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNUGeneral Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU Classpath; see the file COPYING.  If not, write to theFree Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA02110-1301 USA.Linking this library statically or dynamically with other modules ismaking a combined work based on this library.  Thus, the terms andconditions of the GNU General Public License cover the wholecombination.As a special exception, the copyright holders of this library give youpermission to link this library with independent modules to produce anexecutable, regardless of the license terms of these independentmodules, and to copy and distribute the resulting executable underterms of your choice, provided that you also meet, for each linkedindependent module, the terms and conditions of the license of thatmodule.  An independent module is a module which is not derived fromor based on this library.  If you modify this library, you may extendthis exception to your version of the library, but you are notobligated to do so.  If you do not wish to do so, delete thisexception statement from your version. */package java.net;import gnu.java.net.PlainSocketImpl;import java.io.IOException;import java.io.InputStream;import java.io.OutputStream;import java.nio.channels.IllegalBlockingModeException;import java.nio.channels.SocketChannel;/* Written using on-line Java Platform 1.2 API Specification. * Status:  I believe all methods are implemented. *//** * This class models a client site socket.  A socket is a TCP/IP endpoint * for network communications conceptually similar to a file handle. * <p> * This class does not actually do any work.  Instead, it redirects all of * its calls to a socket implementation object which implements the * <code>SocketImpl</code> interface.  The implementation class is * instantiated by factory class that implements the * <code>SocketImplFactory interface</code>.  A default * factory is provided, however the factory may be set by a call to * the <code>setSocketImplFactory</code> method.  Note that this may only be * done once per virtual machine.  If a subsequent attempt is made to set the * factory, a <code>SocketException</code> will be thrown. * * @author Aaron M. Renn (arenn@urbanophile.com) * @author Per Bothner (bothner@cygnus.com) */public class Socket{  /**   * This is the user SocketImplFactory for this class.  If this variable is   * null, a default factory is used.   */  static SocketImplFactory factory;  /**   * The implementation object to which calls are redirected   */  // package-private because ServerSocket.implAccept() needs to access it.  SocketImpl impl;  /**   * True if socket implementation was created by calling their   * create() method.   */  // package-private because ServerSocket.implAccept() needs to access it.  boolean implCreated;  /**   * True if the socket is bound.   * Package private so it can be set from ServerSocket when accept is called.   */  boolean bound;  /**   * True if input is shutdown.   */  private boolean inputShutdown;  /**   * True if output is shutdown.   */  private boolean outputShutdown;  /**   * Initializes a new instance of <code>Socket</code> object without   * connecting to a remote host.  This useful for subclasses of socket that   * might want this behavior.   *   * @specnote This constructor is public since JDK 1.4   * @since 1.1   */  public Socket()  {    if (factory != null)      impl = factory.createSocketImpl();    else      impl = new PlainSocketImpl();  }  /**   * Initializes a new instance of <code>Socket</code> object without   * connecting to a remote host.  This is useful for subclasses of socket   * that might want this behavior.   * <p>   * Additionally, this socket will be created using the supplied   * implementation class instead the default class or one returned by a   * factory.  If this value is <code>null</code>, the default Socket   * implementation is used.   *   * @param impl The <code>SocketImpl</code> to use for this   *             <code>Socket</code>   *   * @exception SocketException If an error occurs   *   * @since 1.1   */  protected Socket(SocketImpl impl) throws SocketException  {    if (impl == null)      this.impl = new PlainSocketImpl();    else      this.impl = impl;  }  /**   * Initializes a new instance of <code>Socket</code> and connects to the   * hostname and port specified as arguments.   *   * @param host The name of the host to connect to   * @param port The port number to connect to   *   * @exception UnknownHostException If the hostname cannot be resolved to a   * network address.   * @exception IOException If an error occurs   * @exception SecurityException If a security manager exists and its   * checkConnect method doesn't allow the operation   */  public Socket(String host, int port)    throws UnknownHostException, IOException  {    this(InetAddress.getByName(host), port, null, 0, true);  }  /**   * Initializes a new instance of <code>Socket</code> and connects to the   * address and port number specified as arguments.   *   * @param address The address to connect to   * @param port The port number to connect to   *   * @exception IOException If an error occurs   * @exception SecurityException If a security manager exists and its   * checkConnect method doesn't allow the operation   */  public Socket(InetAddress address, int port) throws IOException  {    this(address, port, null, 0, true);  }  /**   * Initializes a new instance of <code>Socket</code> that connects to the   * named host on the specified port and binds to the specified local address   * and port.   *   * @param host The name of the remote host to connect to.   * @param port The remote port to connect to.   * @param localAddr The local address to bind to.   * @param localPort The local port to bind to.   *   * @exception SecurityException If the <code>SecurityManager</code>   * exists and does not allow a connection to the specified host/port or   * binding to the specified local host/port.   * @exception IOException If a connection error occurs.   *   * @since 1.1   */  public Socket(String host, int port, InetAddress localAddr, int localPort)    throws IOException  {    this(InetAddress.getByName(host), port, localAddr, localPort, true);  }  /**   * Initializes a new instance of <code>Socket</code> and connects to the   * address and port number specified as arguments, plus binds to the   * specified local address and port.   *   * @param address The remote address to connect to   * @param port The remote port to connect to   * @param localAddr The local address to connect to   * @param localPort The local port to connect to   *   * @exception IOException If an error occurs   * @exception SecurityException If a security manager exists and its   * checkConnect method doesn't allow the operation   *   * @since 1.1   */  public Socket(InetAddress address, int port, InetAddress localAddr,                int localPort) throws IOException  {    this(address, port, localAddr, localPort, true);  }  /**   * Initializes a new instance of <code>Socket</code> and connects to the   * hostname and port specified as arguments.  If the stream argument is set   * to <code>true</code>, then a stream socket is created.  If it is   * <code>false</code>, a datagram socket is created.   *   * @param host The name of the host to connect to   * @param port The port to connect to   * @param stream <code>true</code> for a stream socket, <code>false</code>   * for a datagram socket   *   * @exception IOException If an error occurs   * @exception SecurityException If a security manager exists and its   * checkConnect method doesn't allow the operation   *   * @deprecated Use the <code>DatagramSocket</code> class to create   * datagram oriented sockets.   */  public Socket(String host, int port, boolean stream)    throws IOException  {    this(InetAddress.getByName(host), port, null, 0, stream);  }  /**   * Initializes a new instance of <code>Socket</code> and connects to the   * address and port number specified as arguments.  If the stream param is   * <code>true</code>, a stream socket will be created, otherwise a datagram   * socket is created.   *   * @param host The address to connect to   * @param port The port number to connect to   * @param stream <code>true</code> to create a stream socket,   * <code>false</code> to create a datagram socket.   *   * @exception IOException If an error occurs   * @exception SecurityException If a security manager exists and its   * checkConnect method doesn't allow the operation   *   * @deprecated Use the <code>DatagramSocket</code> class to create   * datagram oriented sockets.   */  public Socket(InetAddress host, int port, boolean stream)    throws IOException  {    this(host, port, null, 0, stream);  }  /**   * This constructor is where the real work takes place.  Connect to the   * specified address and port.  Use default local values if not specified,   * otherwise use the local host and port passed in.  Create as stream or   * datagram based on "stream" argument.   * <p>   *   * @param raddr The remote address to connect to   * @param rport The remote port to connect to   * @param laddr The local address to connect to   * @param lport The local port to connect to   * @param stream true for a stream socket, false for a datagram socket   *   * @exception IOException If an error occurs   * @exception SecurityException If a security manager exists and its   * checkConnect method doesn't allow the operation   */  private Socket(InetAddress raddr, int rport, InetAddress laddr, int lport,                 boolean stream) throws IOException  {    this();    SecurityManager sm = System.getSecurityManager();    if (sm != null)      sm.checkConnect(raddr.getHostName(), rport);    // bind socket    SocketAddress bindaddr =      laddr == null ? null : new InetSocketAddress(laddr, lport);    bind(bindaddr);    // connect socket    connect(new InetSocketAddress(raddr, rport));    // FIXME: JCL p. 1586 says if localPort is unspecified, bind to any port,    // i.e. '0' and if localAddr is unspecified, use getLocalAddress() as    // that default.  JDK 1.2 doc infers not to do a bind.  }  private SocketImpl getImpl() throws SocketException  {    try      {	if (! implCreated)	  {	    impl.create(true);	    implCreated = true;	  }      }    catch (IOException e)      {	SocketException se = new SocketException(e.toString());	se.initCause(e);	throw se;      }    return impl;  }  /**   * Binds the socket to the givent local address/port   *   * @param bindpoint The address/port to bind to   *   * @exception IOException If an error occurs   * @exception SecurityException If a security manager exists and its   * checkConnect method doesn't allow the operation   * @exception IllegalArgumentException If the address type is not supported   *   * @since 1.4   */  public void bind(SocketAddress bindpoint) throws IOException  {    if (isClosed())      throw new SocketException("socket is closed");    // XXX: JDK 1.4.1 API documentation says that if bindpoint is null the    // socket will be bound to an ephemeral port and a valid local address.    if (bindpoint == null)      bindpoint = new InetSocketAddress(InetAddress.ANY_IF, 0);    if (! (bindpoint instanceof InetSocketAddress))      throw new IllegalArgumentException();    InetSocketAddress tmp = (InetSocketAddress) bindpoint;    // bind to address/port    try      {	getImpl().bind(tmp.getAddress(), tmp.getPort());	bound = true;      }    catch (IOException exception)      {	close();	throw exception;      }    catch (RuntimeException exception)      {	close();	throw exception;      }    catch (Error error)      {	close();	throw error;      }  }  /**   * Connects the socket with a remote address.   *   * @param endpoint The address to connect to   *   * @exception IOException If an error occurs   * @exception IllegalArgumentException If the addess type is not supported   * @exception IllegalBlockingModeException If this socket has an associated   * channel, and the channel is in non-blocking mode   *   * @since 1.4   */  public void connect(SocketAddress endpoint) throws IOException  {    connect(endpoint, 0);  }  /**   * Connects the socket with a remote address. A timeout of zero is   * interpreted as an infinite timeout. The connection will then block   * until established or an error occurs.   *   * @param endpoint The address to connect to   * @param timeout The length of the timeout in milliseconds, or   * 0 to indicate no timeout.   *   * @exception IOException If an error occurs   * @exception IllegalArgumentException If the address type is not supported   * @exception IllegalBlockingModeException If this socket has an associated   * channel, and the channel is in non-blocking mode   * @exception SocketTimeoutException If the timeout is reached   *   * @since 1.4   */  public void connect(SocketAddress endpoint, int timeout)    throws IOException  {    if (isClosed())      throw new SocketException("socket is closed");

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
综合色中文字幕| 午夜日韩在线电影| 亚洲一卡二卡三卡四卡五卡| 亚洲成a人v欧美综合天堂下载| 亚洲成人资源网| 国产精品中文字幕欧美| 成人在线视频一区二区| 91浏览器打开| 日韩一区二区不卡| 亚洲欧洲精品一区二区三区| 午夜精品视频在线观看| 国产成人精品影视| 在线免费一区三区| 久久九九影视网| 亚洲国产精品综合小说图片区| 看电视剧不卡顿的网站| 99精品偷自拍| 久久夜色精品国产噜噜av| 亚洲九九爱视频| 国产在线不卡一卡二卡三卡四卡| 91在线免费看| 久久在线观看免费| 亚洲成av人片一区二区梦乃| 成人黄色国产精品网站大全在线免费观看| 欧美视频一区二区三区四区| 久久嫩草精品久久久精品| 亚洲一区二区影院| 成人av片在线观看| 精品国产露脸精彩对白| 亚洲成人一区二区在线观看| 成人午夜私人影院| 精品国产免费一区二区三区香蕉| 玉足女爽爽91| 不卡电影免费在线播放一区| 欧美成人精品福利| 亚洲va国产天堂va久久en| www..com久久爱| 国产亚洲综合性久久久影院| 另类小说综合欧美亚洲| 欧美日本一区二区| 亚洲国产一区二区三区| 成人高清免费观看| 久久久精品天堂| 午夜精品久久久久久| 国产乱人伦偷精品视频免下载| 欧美高清hd18日本| 午夜视频在线观看一区| 欧美综合在线视频| 亚洲综合区在线| 色婷婷综合中文久久一本| 中文字幕欧美一| 成人精品高清在线| 国产精品乱子久久久久| 国产99久久精品| 中文字幕不卡在线观看| 成人精品鲁一区一区二区| 久久精品一区二区三区不卡 | 日本成人在线不卡视频| 欧美网站大全在线观看| 亚洲国产婷婷综合在线精品| 在线观看网站黄不卡| 亚洲国产视频直播| 欧美肥妇bbw| 麻豆91在线播放免费| 日韩欧美二区三区| 日韩高清中文字幕一区| 欧美不卡一区二区| 国产一区二区在线观看视频| 国产日韩欧美电影| 99精品视频中文字幕| 亚洲欧美在线aaa| 美女免费视频一区二区| 宅男噜噜噜66一区二区66| 奇米色一区二区| 久久日韩精品一区二区五区| 成人黄色一级视频| 亚洲午夜久久久久久久久电影院 | 欧美系列亚洲系列| 蜜桃视频一区二区三区在线观看| 日韩精品一区二区三区视频在线观看| 国产一区二区美女| 国产精品成人在线观看| 欧美四级电影在线观看| 老汉av免费一区二区三区| 亚洲国产高清在线| 欧美午夜不卡视频| 国产麻豆精品视频| 欧美激情在线一区二区三区| 色视频一区二区| 五月天丁香久久| 国产亚洲欧美在线| 在线免费观看一区| 国产一区二区三区最好精华液| 亚洲欧美日本在线| 精品免费视频.| 色婷婷久久久综合中文字幕| 激情综合五月婷婷| 一区二区三区在线免费播放| 久久亚洲综合色一区二区三区| 91免费看片在线观看| 另类专区欧美蜜桃臀第一页| 亚洲精品成人天堂一二三| 久久综合精品国产一区二区三区| 色婷婷亚洲综合| 国产成a人亚洲| 欧美aaa在线| 亚洲一区二区四区蜜桃| 国产人伦精品一区二区| 日韩一区二区免费在线观看| 91麻豆精品一区二区三区| 精品一区二区三区免费播放| 亚洲成人先锋电影| 亚洲卡通动漫在线| 国产精品免费久久久久| 精品久久久久99| 欧美美女直播网站| 一本久道中文字幕精品亚洲嫩| 亚洲精品五月天| 中文在线资源观看网站视频免费不卡| 日韩一区二区三区在线| 欧美亚洲国产怡红院影院| 99视频一区二区| 成人性色生活片| 国产精品资源在线看| 日本在线不卡一区| 亚洲综合清纯丝袜自拍| 久久久精品免费免费| 日韩亚洲欧美在线| 欧美综合一区二区三区| 99re亚洲国产精品| 成人免费视频视频| 国产一区二区三区在线观看免费 | 成人免费黄色在线| 国产一区二区女| 精品一二线国产| 美女性感视频久久| 亚洲亚洲精品在线观看| 欧美激情一区二区三区| 国产亚洲自拍一区| 中文子幕无线码一区tr| 国产日韩欧美一区二区三区乱码| 久久一区二区三区四区| 精品精品国产高清a毛片牛牛 | 亚洲综合一区在线| 亚洲另类中文字| 一区二区三区在线视频播放| 亚洲精品中文在线观看| 亚洲精品乱码久久久久| 亚洲激情综合网| 亚洲欧美日韩一区| 亚洲一本大道在线| 日韩av在线播放中文字幕| 秋霞午夜av一区二区三区| 老司机免费视频一区二区三区| 精品一区二区三区在线观看 | 亚洲高清免费观看高清完整版在线观看 | 亚洲欧洲精品一区二区精品久久久 | 国产成人av自拍| 91麻豆精品视频| 欧美电视剧免费全集观看| 亚洲欧美日韩国产成人精品影院| 日韩不卡手机在线v区| fc2成人免费人成在线观看播放 | 成人性色生活片免费看爆迷你毛片| 欧美中文字幕不卡| 国产日韩欧美精品综合| 日日欢夜夜爽一区| 成人avav影音| 精品国产伦一区二区三区免费 | 日韩成人一级大片| 99视频精品全部免费在线| 日韩免费观看2025年上映的电影 | 精品久久久久久久久久久久包黑料 | 韩国精品主播一区二区在线观看 | 粉嫩av一区二区三区在线播放 | 精品久久久久久久久久久久久久久久久| 一色屋精品亚洲香蕉网站| 久久精品国产99国产精品| 欧美三级乱人伦电影| 国产精品毛片久久久久久久| 精品一区二区三区免费视频| 88在线观看91蜜桃国自产| 亚洲美女精品一区| 成人成人成人在线视频| 久久久久国色av免费看影院| 日本午夜一本久久久综合| 欧洲视频一区二区| 亚洲丝袜美腿综合| 白白色亚洲国产精品| 国产亚洲精品aa| 国产精品中文有码| 久久综合九色综合欧美98| 青青草国产成人av片免费| 欧美精品第1页| 亚洲18色成人| 欧美乱妇15p| 日韩国产精品久久久久久亚洲| 欧美日韩在线不卡| 亚洲va欧美va国产va天堂影院| 欧美撒尿777hd撒尿|