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

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

?? standardsocketfactory.java

?? mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序
?? JAVA
字號:
/* Copyright (C) 2002-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as  published by the Free Software Foundation. There are special exceptions to the terms and conditions of the GPL  as it is applied to this software. View the full text of the  exception in file EXCEPTIONS-CONNECTOR-J in the directory of this  software distribution. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */package com.mysql.jdbc;import java.io.IOException;import java.lang.reflect.Constructor;import java.lang.reflect.InvocationTargetException;import java.lang.reflect.Method;import java.net.InetAddress;import java.net.Socket;import java.net.SocketException;import java.util.Properties;/** * Socket factory for vanilla TCP/IP sockets (the standard) *  * @author Mark Matthews */public class StandardSocketFactory implements SocketFactory {	public static final String TCP_NO_DELAY_PROPERTY_NAME = "tcpNoDelay";	public static final String TCP_KEEP_ALIVE_DEFAULT_VALUE = "true";	public static final String TCP_KEEP_ALIVE_PROPERTY_NAME = "tcpKeepAlive";	public static final String TCP_RCV_BUF_PROPERTY_NAME = "tcpRcvBuf";	public static final String TCP_SND_BUF_PROPERTY_NAME = "tcpSndBuf";	public static final String TCP_TRAFFIC_CLASS_PROPERTY_NAME = "tcpTrafficClass";	public static final String TCP_RCV_BUF_DEFAULT_VALUE = "0";	public static final String TCP_SND_BUF_DEFAULT_VALUE = "0";	public static final String TCP_TRAFFIC_CLASS_DEFAULT_VALUE = "0";	public static final String TCP_NO_DELAY_DEFAULT_VALUE = "true";	/** Use reflection for pre-1.4 VMs */	private static Method setTraficClassMethod;	static {		try {			setTraficClassMethod = Socket.class.getMethod("setTrafficClass",					new Class[] { Integer.TYPE });		} catch (SecurityException e) {			setTraficClassMethod = null;		} catch (NoSuchMethodException e) {			setTraficClassMethod = null;		}	}	/** The hostname to connect to */	protected String host = null;	/** The port number to connect to */	protected int port = 3306;	/** The underlying TCP/IP socket to use */	protected Socket rawSocket = null;	/**	 * Called by the driver after issuing the MySQL protocol handshake and	 * reading the results of the handshake.	 * 	 * @throws SocketException	 *             if a socket error occurs	 * @throws IOException	 *             if an I/O error occurs	 * 	 * @return The socket to use after the handshake	 */	public Socket afterHandshake() throws SocketException, IOException {		return this.rawSocket;	}	/**	 * Called by the driver before issuing the MySQL protocol handshake. Should	 * return the socket instance that should be used during the handshake.	 * 	 * @throws SocketException	 *             if a socket error occurs	 * @throws IOException	 *             if an I/O error occurs	 * 	 * @return the socket to use before the handshake	 */	public Socket beforeHandshake() throws SocketException, IOException {		return this.rawSocket;	}	/**	 * Configures socket properties based on properties from the connection	 * (tcpNoDelay, snd/rcv buf, traffic class, etc).	 * 	 * @param props	 * @throws SocketException	 * @throws IOException	 */	private void configureSocket(Socket sock, Properties props) throws SocketException,			IOException {		try {			sock.setTcpNoDelay(Boolean.valueOf(					props.getProperty(TCP_NO_DELAY_PROPERTY_NAME,							TCP_NO_DELAY_DEFAULT_VALUE)).booleanValue());			String keepAlive = props.getProperty(TCP_KEEP_ALIVE_PROPERTY_NAME,					TCP_KEEP_ALIVE_DEFAULT_VALUE);			if (keepAlive != null && keepAlive.length() > 0) {				sock.setKeepAlive(Boolean.valueOf(keepAlive)						.booleanValue());			}			int receiveBufferSize = Integer.parseInt(props.getProperty(					TCP_RCV_BUF_PROPERTY_NAME, TCP_RCV_BUF_DEFAULT_VALUE));			if (receiveBufferSize > 0) {				sock.setReceiveBufferSize(receiveBufferSize);			}			int sendBufferSize = Integer.parseInt(props.getProperty(					TCP_SND_BUF_PROPERTY_NAME, TCP_SND_BUF_DEFAULT_VALUE));			if (sendBufferSize > 0) {				sock.setSendBufferSize(sendBufferSize);			}			int trafficClass = Integer.parseInt(props.getProperty(					TCP_TRAFFIC_CLASS_PROPERTY_NAME,					TCP_TRAFFIC_CLASS_DEFAULT_VALUE));			if (trafficClass > 0 && setTraficClassMethod != null) {				setTraficClassMethod.invoke(sock,						new Object[] { new Integer(trafficClass) });			}		} catch (Throwable t) {			unwrapExceptionToProperClassAndThrowIt(t);		}	}	/**	 * @see com.mysql.jdbc.SocketFactory#createSocket(Properties)	 */	public Socket connect(String hostname, int portNumber, Properties props)			throws SocketException, IOException {		if (props != null) {			this.host = hostname;			this.port = portNumber;			Method connectWithTimeoutMethod = null;			Method socketBindMethod = null;			Class socketAddressClass = null;			String localSocketHostname = props					.getProperty("localSocketAddress");			String connectTimeoutStr = props.getProperty("connectTimeout");			int connectTimeout = 0;			boolean wantsTimeout = (connectTimeoutStr != null					&& connectTimeoutStr.length() > 0 && !connectTimeoutStr					.equals("0"));			boolean wantsLocalBind = (localSocketHostname != null && localSocketHostname					.length() > 0);			boolean needsConfigurationBeforeConnect = socketNeedsConfigurationBeforeConnect(props);						if (wantsTimeout || wantsLocalBind || needsConfigurationBeforeConnect) {				if (connectTimeoutStr != null) {					try {						connectTimeout = Integer.parseInt(connectTimeoutStr);					} catch (NumberFormatException nfe) {						throw new SocketException("Illegal value '"								+ connectTimeoutStr + "' for connectTimeout");					}				}				try {					// Have to do this with reflection, otherwise older JVMs					// croak					socketAddressClass = Class							.forName("java.net.SocketAddress");					connectWithTimeoutMethod = Socket.class.getMethod(							"connect", new Class[] { socketAddressClass,									Integer.TYPE });					socketBindMethod = Socket.class.getMethod("bind",							new Class[] { socketAddressClass });				} catch (NoClassDefFoundError noClassDefFound) {					// ignore, we give a better error below if needed				} catch (NoSuchMethodException noSuchMethodEx) {					// ignore, we give a better error below if needed				} catch (Throwable catchAll) {					// ignore, we give a better error below if needed				}				if (wantsLocalBind && socketBindMethod == null) {					throw new SocketException(							"Can't specify \"localSocketAddress\" on JVMs older than 1.4");				}				if (wantsTimeout && connectWithTimeoutMethod == null) {					throw new SocketException(							"Can't specify \"connectTimeout\" on JVMs older than 1.4");				}			}			if (this.host != null) {				if (!(wantsLocalBind || wantsTimeout || needsConfigurationBeforeConnect)) {					InetAddress[] possibleAddresses = InetAddress							.getAllByName(this.host);					Throwable caughtWhileConnecting = null;					// Need to loop through all possible addresses, in case					// someone has IPV6 configured (SuSE, for example...)					for (int i = 0; i < possibleAddresses.length; i++) {						try {							this.rawSocket = new Socket(possibleAddresses[i],									port);							configureSocket(this.rawSocket, props);							break;						} catch (Exception ex) {							caughtWhileConnecting = ex;						}					}					if (rawSocket == null) {						unwrapExceptionToProperClassAndThrowIt(caughtWhileConnecting);					}				} else {					// must explicitly state this due to classloader issues					// when running on older JVMs :(					try {						InetAddress[] possibleAddresses = InetAddress								.getAllByName(this.host);						Throwable caughtWhileConnecting = null;						Object localSockAddr = null;						Class inetSocketAddressClass = null;						Constructor addrConstructor = null;						try {							inetSocketAddressClass = Class									.forName("java.net.InetSocketAddress");							addrConstructor = inetSocketAddressClass									.getConstructor(new Class[] {											InetAddress.class, Integer.TYPE });							if (wantsLocalBind) {								localSockAddr = addrConstructor										.newInstance(new Object[] {												InetAddress														.getByName(localSocketHostname),												new Integer(0 /*																 * use ephemeral																 * port																 */) });							}						} catch (Throwable ex) {							unwrapExceptionToProperClassAndThrowIt(ex);						}						// Need to loop through all possible addresses, in case						// someone has IPV6 configured (SuSE, for example...)						for (int i = 0; i < possibleAddresses.length; i++) {							try {								this.rawSocket = new Socket();								configureSocket(this.rawSocket, props);								Object sockAddr = addrConstructor										.newInstance(new Object[] {												possibleAddresses[i],												new Integer(port) });								// bind to the local port, null is 'ok', it								// means								// use the ephemeral port								socketBindMethod.invoke(rawSocket,										new Object[] { localSockAddr });								connectWithTimeoutMethod.invoke(rawSocket,										new Object[] { sockAddr,												new Integer(connectTimeout) });								break;							} catch (Exception ex) {								this.rawSocket = null;								caughtWhileConnecting = ex;							}						}						if (this.rawSocket == null) {							unwrapExceptionToProperClassAndThrowIt(caughtWhileConnecting);						}					} catch (Throwable t) {						unwrapExceptionToProperClassAndThrowIt(t);					}				}				return this.rawSocket;			}		}		throw new SocketException("Unable to create socket");	}	/**	 * Does the configureSocket() need to be called before the socket is	 * connect()d based on the properties supplied?	 * 	 */	private boolean socketNeedsConfigurationBeforeConnect(Properties props) {		int receiveBufferSize = Integer.parseInt(props.getProperty(				TCP_RCV_BUF_PROPERTY_NAME, TCP_RCV_BUF_DEFAULT_VALUE));		if (receiveBufferSize > 0) {			return true;		}		int sendBufferSize = Integer.parseInt(props.getProperty(				TCP_SND_BUF_PROPERTY_NAME, TCP_SND_BUF_DEFAULT_VALUE));		if (sendBufferSize > 0) {			return true;		}		int trafficClass = Integer.parseInt(props.getProperty(				TCP_TRAFFIC_CLASS_PROPERTY_NAME,				TCP_TRAFFIC_CLASS_DEFAULT_VALUE));		if (trafficClass > 0 && setTraficClassMethod != null) {			return true;		}		return false;	}	private void unwrapExceptionToProperClassAndThrowIt(			Throwable caughtWhileConnecting) throws SocketException,			IOException {		if (caughtWhileConnecting instanceof InvocationTargetException) {			// Replace it with the target, don't use 1.4 chaining as this still			// needs to run on older VMs			caughtWhileConnecting = ((InvocationTargetException) caughtWhileConnecting)					.getTargetException();		}		if (caughtWhileConnecting instanceof SocketException) {			throw (SocketException) caughtWhileConnecting;		}		if (caughtWhileConnecting instanceof IOException) {			throw (IOException) caughtWhileConnecting;		}		throw new SocketException(caughtWhileConnecting.toString());	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品日日摸夜夜摸av| 欧美探花视频资源| 日本道色综合久久| 2023国产精华国产精品| 国产欧美日韩在线看| 99久久综合精品| 国产精品久久久久久久岛一牛影视 | 日韩经典中文字幕一区| 午夜精品福利一区二区蜜股av| 欧美日韩一级视频| 视频一区二区中文字幕| 日韩欧美一级特黄在线播放| 风流少妇一区二区| 日本视频免费一区| www一区二区| av一区二区久久| 亚洲免费毛片网站| 欧美国产欧美综合| 欧美一区二区三区爱爱| 91在线视频免费91| 国产在线精品一区二区夜色| 国产精品动漫网站| 精品av综合导航| 欧美一区二区三区在线电影| caoporn国产精品| 人禽交欧美网站| 亚洲二区在线视频| 亚洲色图丝袜美腿| 欧美韩国一区二区| 日韩一区精品字幕| 精品国产伦一区二区三区观看体验 | 91丨国产丨九色丨pron| 国产一区中文字幕| 在线播放视频一区| 中文字幕一区二区日韩精品绯色| 日韩免费电影网站| 全国精品久久少妇| 日韩欧美亚洲另类制服综合在线| 极品少妇xxxx精品少妇| 制服丝袜av成人在线看| 日韩精品一二三| 日韩午夜在线播放| 久99久精品视频免费观看| 精品蜜桃在线看| 91精品国产福利在线观看 | 中文字幕日韩精品一区| 国产精品麻豆网站| 欧美激情自拍偷拍| 欧美国产精品专区| 青青草国产精品97视觉盛宴| 欧美经典一区二区三区| 欧美一区二区三区视频在线| 视频一区欧美精品| 日韩精品影音先锋| 国产乱码精品一区二区三区五月婷| 久久综合视频网| 成人激情综合网站| 亚洲综合图片区| 91精品国产色综合久久| 九一九一国产精品| 中文字幕一区二区三中文字幕| 91国偷自产一区二区开放时间| 亚洲成人福利片| 精品国产91洋老外米糕| 成人免费毛片app| 性久久久久久久| 久久久久久久久久久久电影| av不卡免费在线观看| 偷窥国产亚洲免费视频| 久久精品免费在线观看| 一本到一区二区三区| 麻豆精品在线视频| 亚洲欧美一区二区三区孕妇| 91麻豆精品国产91久久久久久| 国产成人日日夜夜| 亚洲高清免费一级二级三级| 国产三级欧美三级日产三级99 | 亚洲男人都懂的| 日韩天堂在线观看| 91视视频在线观看入口直接观看www | 97久久精品人人爽人人爽蜜臀| 亚洲狠狠爱一区二区三区| 精品国精品国产| 欧美三级电影在线观看| 粉嫩一区二区三区性色av| 香蕉加勒比综合久久 | 久久女同精品一区二区| 欧美亚洲一区二区在线观看| 国产麻豆欧美日韩一区| 亚洲成av人片一区二区梦乃| 国产精品久久久久婷婷| 欧美成人精品1314www| 欧美性猛片aaaaaaa做受| 国产91精品精华液一区二区三区 | 欧美日韩1区2区| 99精品欧美一区二区三区小说| 久久66热re国产| 日韩专区一卡二卡| 亚洲一区二区三区四区五区中文| 国产亚洲精品aa午夜观看| 日韩欧美视频一区| 欧美精选一区二区| 欧美图区在线视频| 欧洲av一区二区嗯嗯嗯啊| 99久久免费国产| 不卡一区在线观看| 粉嫩av一区二区三区粉嫩| 国产精品亚洲午夜一区二区三区| 理论片日本一区| 欧美aaa在线| 欧美aⅴ一区二区三区视频| 日韩国产一区二| 亚洲成精国产精品女| 亚洲午夜一区二区三区| 亚洲综合一二区| 亚洲成人资源网| 婷婷丁香激情综合| 日本女优在线视频一区二区| 日韩国产精品久久| 久久99精品国产麻豆婷婷| 美日韩黄色大片| 黄色日韩三级电影| 国产一区二区三区美女| 国产一区二三区| 成人深夜视频在线观看| 99久久99久久精品免费观看| 91麻豆国产福利精品| 欧美优质美女网站| 3atv在线一区二区三区| 精品少妇一区二区三区免费观看| 精品99999| 国产精品国产三级国产aⅴ入口| 成人免费视频在线观看| 亚洲国产视频网站| 免费在线观看一区| 国产精品一二一区| 91一区二区三区在线观看| 欧美亚洲禁片免费| 日韩精品自拍偷拍| 久久久国产午夜精品| 综合久久给合久久狠狠狠97色| 亚洲最大成人综合| 久久精品国产免费看久久精品| 国产精品亚洲专一区二区三区 | 国产成人午夜精品影院观看视频 | 国模无码大尺度一区二区三区| 国产成人福利片| 欧美视频一区二| 精品国产免费久久| 一区二区三区欧美日韩| 久久se这里有精品| 91在线一区二区| 欧美一级一级性生活免费录像| 欧美激情综合在线| 日本不卡123| 99视频一区二区| 日韩女优av电影| 亚洲日穴在线视频| 国产在线视频精品一区| 欧美性猛交xxxxxx富婆| 久久久欧美精品sm网站| 亚洲一二三四久久| 成人晚上爱看视频| 欧美不卡视频一区| 亚洲综合一区在线| 国产91丝袜在线播放九色| 欧美精品电影在线播放| 中文字幕在线观看不卡| 久久se这里有精品| 777亚洲妇女| 亚洲欧美精品午睡沙发| 国产ts人妖一区二区| 欧美精品九九99久久| 亚洲三级电影网站| 成人丝袜18视频在线观看| 精品国产免费视频| 日本一区中文字幕| 欧洲色大大久久| 亚洲美腿欧美偷拍| www.亚洲色图.com| 国产亚洲福利社区一区| 免费日本视频一区| 欧美日韩激情一区二区| 一区二区三区四区在线播放| 国产不卡视频一区二区三区| 精品日韩在线观看| 奇米精品一区二区三区在线观看 | 日韩美女视频在线| 免费成人av资源网| 在线播放亚洲一区| 婷婷丁香久久五月婷婷| 欧美美女一区二区| 五月综合激情婷婷六月色窝| 91老师片黄在线观看| 国产精品白丝在线| 成人av在线资源网| 亚洲国产成人一区二区三区| 国产一区二区三区香蕉| 久久久久久免费网| 国产精品一区二区免费不卡|