分享
 
 
 

java.net.SocketImpl翻译

王朝java/jsp·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<!--NewPage-->

<HTML>

<HEAD>

<!-- Generated by javadoc (build 1.4.2-rc) on Fri Jun 13 00:14:24 PDT 2003 -->

<TITLE>

SocketImpl (Java 2 Platform SE v1.4.2)

</TITLE>

<META NAME="keywords" CONTENT="java.net.SocketImpl class">

<META NAME="keywords" CONTENT="fd">

<META NAME="keywords" CONTENT="address">

<META NAME="keywords" CONTENT="port">

<META NAME="keywords" CONTENT="localport">

<META NAME="keywords" CONTENT="create()">

<META NAME="keywords" CONTENT="connect()">

<META NAME="keywords" CONTENT="bind()">

<META NAME="keywords" CONTENT="listen()">

<META NAME="keywords" CONTENT="accept()">

<META NAME="keywords" CONTENT="getInputStream()">

<META NAME="keywords" CONTENT="getOutputStream()">

<META NAME="keywords" CONTENT="available()">

<META NAME="keywords" CONTENT="close()">

<META NAME="keywords" CONTENT="shutdownInput()">

<META NAME="keywords" CONTENT="shutdownOutput()">

<META NAME="keywords" CONTENT="getFileDescriptor()">

<META NAME="keywords" CONTENT="getInetAddress()">

<META NAME="keywords" CONTENT="getPort()">

<META NAME="keywords" CONTENT="supportsUrgentData()">

<META NAME="keywords" CONTENT="sendUrgentData()">

<META NAME="keywords" CONTENT="getLocalPort()">

<META NAME="keywords" CONTENT="toString()">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">

function windowTitle()

{

parent.document.title="SocketImpl (Java 2 Platform SE v1.4.2)";

}

</SCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">

<!-- ========= START OF TOP NAVBAR ======= -->

<A NAME="navbar_top"><!-- --></A>

<A HREF="#skip-navbar_top" title="Skip navigation links"></A>

<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">

<TR>

<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">

<A NAME="navbar_top_firstrow"><!-- --></A>

<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">

<TR ALIGN="center" VALIGN="top">

<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>

<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>

<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>

<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SocketImpl.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>

<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>

<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>

<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>

</TR>

</TABLE>

</TD>

<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>

<b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.4.2</b></EM>

</TD>

</TR>

<TR>

<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">

&nbsp;<A HREF="../../java/net/SocketAddress.html" title="class in java.net"><B>PREV CLASS</B></A>&nbsp;

&nbsp;<A HREF="../../java/net/SocketPermission.html" title="class in java.net"><B>NEXT CLASS</B></A></FONT></TD>

<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">

<A HREF="../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;

&nbsp;<A HREF="SocketImpl.html" target="_top"><B>NO FRAMES</B></A> &nbsp;

&nbsp;<SCRIPT type="text/javascript">

<!--

if(window==top) {

document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');

}

//-->

</SCRIPT>

<NOSCRIPT>

<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>

</NOSCRIPT>

</FONT></TD>

</TR>

<TR>

<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">

SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>

<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">

DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>

</TR>

</TABLE>

<A NAME="skip-navbar_top"></A>

<!-- ========= END OF TOP NAVBAR ========= -->

<HR>

<!-- ======== START OF CLASS DATA ======== -->

<H2>

<FONT SIZE="-1">

java.net</FONT>

<BR>

Class SocketImpl</H2>

<PRE>

<A HREF="../../java/lang/Object.html" title="class in java.lang">java.lang.Object</A>

<IMG SRC="../../resources/inherit.gif" ALT="extended by"><B>java.net.SocketImpl</B>

</PRE>

<DL>

<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../java/net/SocketOptions.html" title="interface in java.net">SocketOptions</A></DD>

</DL>

<HR>

<DL>

<DT>public abstract class <B>SocketImpl</B><DT>extends <A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A><DT>implements <A HREF="../../java/net/SocketOptions.html" title="interface in java.net">SocketOptions</A></DL>

<P>

The abstract class <code>SocketImpl</code> is a common superclass

of all classes that actually implement sockets. It is used to

create both client and server sockets.

抽象类SocketImpl是所有实际实现套接字的类的父类,既用于创建客户端,也用于创建服务器。

<p>

A "plain" socket implements these methods exactly as

described, without attempting to go through a firewall or proxy.

空白套接字实现了下面描述的方法,并不考虑通过防火墙或代理服务器。

<P>

<P>

<DL>

<DT><B>Since:</B></DT>

<DD>JDK1.0</DD>

</DL>

<HR>

<P>

<!-- ======== NESTED CLASS SUMMARY ======== -->

<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">

<TD COLSPAN=2><FONT SIZE="+2">

<B>Field Summary</B></FONT></TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected &nbsp;<A HREF="../../java/net/InetAddress.html" title="class in java.net">InetAddress</A></CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#address">address</A></B></CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The IP address of the remote end of this socket.

此套接字远端的IP地址。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected &nbsp;<A HREF="../../java/io/FileDescriptor.html" title="class in java.io">FileDescriptor</A></CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#fd">fd</A></B></CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The file descriptor object for this socket.

此套接字的文件描述符对象。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected &nbsp;int</CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#localport">localport</A></B></CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The local port number to which this socket is connected.

此套接字连接的本地端口号。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected &nbsp;int</CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#port">port</A></B></CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The port number on the remote host to which this socket is connected.

此套接字连接的远端端口号。</TD>

</TR>

</TABLE>

&nbsp;<A NAME="fields_inherited_from_class_java.net.SocketOptions"><!-- --></A>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">

<TD><B>Fields inherited from interface java.net.<A HREF="../../java/net/SocketOptions.html" title="interface in java.net">SocketOptions</A></B></TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD><CODE><A HREF="../../java/net/SocketOptions.html#IP_MULTICAST_IF">IP_MULTICAST_IF</A>, <A HREF="../../java/net/SocketOptions.html#IP_MULTICAST_IF2">IP_MULTICAST_IF2</A>, <A HREF="../../java/net/SocketOptions.html#IP_MULTICAST_LOOP">IP_MULTICAST_LOOP</A>, <A HREF="../../java/net/SocketOptions.html#IP_TOS">IP_TOS</A>, <A HREF="../../java/net/SocketOptions.html#SO_BINDADDR">SO_BINDADDR</A>, <A HREF="../../java/net/SocketOptions.html#SO_BROADCAST">SO_BROADCAST</A>, <A HREF="../../java/net/SocketOptions.html#SO_KEEPALIVE">SO_KEEPALIVE</A>, <A HREF="../../java/net/SocketOptions.html#SO_LINGER">SO_LINGER</A>, <A HREF="../../java/net/SocketOptions.html#SO_OOBINLINE">SO_OOBINLINE</A>, <A HREF="../../java/net/SocketOptions.html#SO_RCVBUF">SO_RCVBUF</A>, <A HREF="../../java/net/SocketOptions.html#SO_REUSEADDR">SO_REUSEADDR</A>, <A HREF="../../java/net/SocketOptions.html#SO_SNDBUF">SO_SNDBUF</A>, <A HREF="../../java/net/SocketOptions.html#SO_TIMEOUT">SO_TIMEOUT</A>, <A HREF="../../java/net/SocketOptions.html#TCP_NODELAY">TCP_NODELAY</A></CODE></TD>

</TR>

</TABLE>

&nbsp;

<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">

<TD COLSPAN=2><FONT SIZE="+2">

<B>Constructor Summary</B></FONT></TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#SocketImpl()">SocketImpl</A></B>()</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>

</TR>

</TABLE>

&nbsp;

<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">

<TD COLSPAN=2><FONT SIZE="+2">

<B>Method Summary</B></FONT></TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected abstract &nbsp;void</CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#accept(java.net.SocketImpl)">accept</A></B>(<A HREF="../../java/net/SocketImpl.html" title="class in java.net">SocketImpl</A>&nbsp;s)</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Accepts a connection.

接收连接。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected abstract &nbsp;int</CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#available()">available</A></B>()</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of bytes that can be read from this socket

without blocking.

返回从未阻塞的套接字读取的字节数。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected abstract &nbsp;void</CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#bind(java.net.InetAddress, int)">bind</A></B>(<A HREF="../../java/net/InetAddress.html" title="class in java.net">InetAddress</A>&nbsp;host,

int&nbsp;port)</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binds this socket to the specified port number on the specified host.

将套接字绑定到指定的端口和地址。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected abstract &nbsp;void</CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#close()">close</A></B>()</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Closes this socket.

关闭套接字。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected abstract &nbsp;void</CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#connect(java.net.InetAddress, int)">connect</A></B>(<A HREF="../../java/net/InetAddress.html" title="class in java.net">InetAddress</A>&nbsp;address,

int&nbsp;port)</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Connects this socket to the specified port number on the specified host.

将套接字连接到指定主机的指定端口。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected abstract &nbsp;void</CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#connect(java.net.SocketAddress, int)">connect</A></B>(<A HREF="../../java/net/SocketAddress.html" title="class in java.net">SocketAddress</A>&nbsp;address,

int&nbsp;timeout)</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Connects this socket to the specified port number on the specified host.

将套接字连接到指定主机的指定端口。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected abstract &nbsp;void</CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#connect(java.lang.String, int)">connect</A></B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;host,

int&nbsp;port)</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Connects this socket to the specified port on the named host.

将套接字连接到指定名称主机的指定端口。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected abstract &nbsp;void</CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#create(boolean)">create</A></B>(boolean&nbsp;stream)</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates either a stream or a datagram socket.

创建数据流或数据报套接字。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected &nbsp;<A HREF="../../java/io/FileDescriptor.html" title="class in java.io">FileDescriptor</A></CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#getFileDescriptor()">getFileDescriptor</A></B>()</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of this socket's <code>fd</code> field.

返回此套接字fd成员变量的值。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected &nbsp;<A HREF="../../java/net/InetAddress.html" title="class in java.net">InetAddress</A></CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#getInetAddress()">getInetAddress</A></B>()</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of this socket's <code>address</code> field.

返回此套接字address成员变量的值。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected abstract &nbsp;<A HREF="../../java/io/InputStream.html" title="class in java.io">InputStream</A></CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#getInputStream()">getInputStream</A></B>()</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an input stream for this socket.

返回此套接字的输入流。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected &nbsp;int</CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#getLocalPort()">getLocalPort</A></B>()</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of this socket's <code>localport</code> field.

返回此套接字localport成员变量的值。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected abstract &nbsp;<A HREF="../../java/io/OutputStream.html" title="class in java.io">OutputStream</A></CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#getOutputStream()">getOutputStream</A></B>()</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an output stream for this socket.

返回此套接字的输出流。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected &nbsp;int</CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#getPort()">getPort</A></B>()</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of this socket's <code>port</code> field.

返回此套接字port成员变量的值。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected abstract &nbsp;void</CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#listen(int)">listen</A></B>(int&nbsp;backlog)</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the maximum queue length for incoming connection indications

(a request to connect) to the <code>count</code> argument.

将呼入连接指示(连接请求)的最大队列长度设置为backlog参数值。如果在队列已满情况下连接指示到达,连接请求被拒绝。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected abstract &nbsp;void</CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#sendUrgentData(int)">sendUrgentData</A></B>(int&nbsp;data)</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Send one byte of urgent data on the socket.

在套接字上发送一个字节的紧急数据。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected &nbsp;void</CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#shutdownInput()">shutdownInput</A></B>()</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Places the input stream for this socket at "end of stream".

将套接字的输入流设置为位于“数据流末”。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected &nbsp;void</CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#shutdownOutput()">shutdownOutput</A></B>()</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Disables the output stream for this socket.

取消此套接字的输出流。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>protected &nbsp;boolean</CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#supportsUrgentData()">supportsUrgentData</A></B>()</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether or not this SocketImpl supports sending

urgent data.

判断此SocketImpl是否支持发送紧急数据。</TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

<CODE>&nbsp;<A HREF="../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>

<TD><CODE><B><A HREF="../../java/net/SocketImpl.html#toString()">toString</A></B>()</CODE>

<BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the address and port of this socket as a <code>String</code>.

以字符串的形式返回套接字的地址和端口。</TD>

</TR>

</TABLE>

&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">

<TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></B></TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD>

</TR>

</TABLE>

&nbsp;<A NAME="methods_inherited_from_class_java.net.SocketOptions"><!-- --></A>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">

<TD><B>Methods inherited from interface java.net.<A HREF="../../java/net/SocketOptions.html" title="interface in java.net">SocketOptions</A></B></TD>

</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">

<TD><CODE><A HREF="../../java/net/SocketOptions.html#getOption(int)">getOption</A>, <A HREF="../../java/net/SocketOptions.html#setOption(int, java.lang.Object)">setOption</A></CODE></TD>

</TR>

</TABLE>

&nbsp;

<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">

<TD COLSPAN=1><FONT SIZE="+2">

<B>Field Detail</B></FONT></TD>

</TR>

</TABLE>

<A NAME="fd"><!-- --></A><H3>

fd</H3>

<PRE>

protected <A HREF="../../java/io/FileDescriptor.html" title="class in java.io">FileDescriptor</A> <B>fd</B></PRE>

<DL>

<DD>The file descriptor object for this socket. 此套接字的文件描述符对象。

<P>

<DL>

</DL>

</DL>

<HR>

<A NAME="address"><!-- --></A><H3>

address</H3>

<PRE>

protected <A HREF="../../java/net/InetAddress.html" title="class in java.net">InetAddress</A> <B>address</B></PRE>

<DL>

<DD>The IP address of the remote end of this socket. 此套接字远端的IP地址。

<P>

<DL>

</DL>

</DL>

<HR>

<A NAME="port"><!-- --></A><H3>

port</H3>

<PRE>

protected int <B>port</B></PRE>

<DL>

<DD>The port number on the remote host to which this socket is connected. 此套接字连接的远端端口号。

<P>

<DL>

</DL>

</DL>

<HR>

<A NAME="localport"><!-- --></A><H3>

localport</H3>

<PRE>

protected int <B>localport</B></PRE>

<DL>

<DD>The local port number to which this socket is connected. 此套接字连接的本地端口号。

<P>

<DL>

</DL>

</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">

<TD COLSPAN=1><FONT SIZE="+2">

<B>Constructor Detail</B></FONT></TD>

</TR>

</TABLE>

<A NAME="SocketImpl()"><!-- --></A><H3>

SocketImpl</H3>

<PRE>

public <B>SocketImpl</B>()</PRE>

<DL>

</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">

<TD COLSPAN=1><FONT SIZE="+2">

<B>Method Detail</B></FONT></TD>

</TR>

</TABLE>

<A NAME="create(boolean)"><!-- --></A><H3>

create</H3>

<PRE>

protected abstract void <B>create</B>(boolean&nbsp;stream)

throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>

<DL>

<DD>Creates either a stream or a datagram socket. 创建数据流或数据报套接字。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Parameters:</B><DD><CODE>stream</CODE> - if <code>true</code>, create a stream socket;

otherwise, create a datagram socket. 如果为true,创建流套接字,否则创建数据报套接字。

<DT><B>Throws:</B>

<DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs while creating the

socket. 当创建套接字时发生I/O错误则抛出。</DL>

</DD>

</DL>

<HR>

<A NAME="connect(java.lang.String, int)"><!-- --></A><H3>

connect</H3>

<PRE>

protected abstract void <B>connect</B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;host,

int&nbsp;port)

throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>

<DL>

<DD>Connects this socket to the specified port on the named host. 将套接字连接到指定名称主机的指定端口。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Parameters:</B><DD><CODE>host</CODE> - the name of the remote host. 远程主机的IP地址。<DD><CODE>port</CODE> - the port number. 端口号。

<DT><B>Throws:</B>

<DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs when connecting to the

remote host. 当连接远程主机时发生I/O错误则抛出。</DL>

</DD>

</DL>

<HR>

<A NAME="connect(java.net.InetAddress, int)"><!-- --></A><H3>

connect</H3>

<PRE>

protected abstract void <B>connect</B>(<A HREF="../../java/net/InetAddress.html" title="class in java.net">InetAddress</A>&nbsp;address,

int&nbsp;port)

throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>

<DL>

<DD>Connects this socket to the specified port number on the specified host.

将套接字连接到指定主机的指定端口。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Parameters:</B><DD><CODE>address</CODE> - the IP address of the remote host. 远程主机的IP地址。<DD><CODE>port</CODE> - the port number. 端口号。

<DT><B>Throws:</B>

<DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs when attempting a

connection. 当尝试连接时发生I/O错误则抛出。</DL>

</DD>

</DL>

<HR>

<A NAME="connect(java.net.SocketAddress, int)"><!-- --></A><H3>

connect</H3>

<PRE>

protected abstract void <B>connect</B>(<A HREF="../../java/net/SocketAddress.html" title="class in java.net">SocketAddress</A>&nbsp;address,

int&nbsp;timeout)

throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>

<DL>

<DD>Connects this socket to the specified port number on the specified host.

A timeout of zero is interpreted as an infinite timeout. The connection

will then block until established or an error occurs.

将套接字连接到指定主机的指定端口。延时值为0被解释为无限延时,连接将阻塞直到建立或错误发生。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Parameters:</B><DD><CODE>address</CODE> - the Socket address of the remote host. 远程主机的Socket地址。<DD><CODE>timeout</CODE> - the timeout value, in milliseconds, or zero for no timeout.

<DT><B>Throws:</B>

<DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs when attempting a

connection. 当尝试连接时发生I/O错误则抛出。<DT><B>Since:</B></DT>

<DD>1.4</DD>

</DL>

</DD>

</DL>

<HR>

<A NAME="bind(java.net.InetAddress, int)"><!-- --></A><H3>

bind</H3>

<PRE>

protected abstract void <B>bind</B>(<A HREF="../../java/net/InetAddress.html" title="class in java.net">InetAddress</A>&nbsp;host,

int&nbsp;port)

throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>

<DL>

<DD>Binds this socket to the specified port number on the specified host.

将套接字绑定到指定的端口和地址。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Parameters:</B><DD><CODE>host</CODE> - the IP address of the remote host. 远程主机的IP地址。

远程主机的IP地址。<DD><CODE>port</CODE> - the port number. 端口号。

<DT><B>Throws:</B>

<DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs when binding this socket.

当绑定套接字时发生I/O错误则抛出。</DL>

</DD>

</DL>

<HR>

<A NAME="listen(int)"><!-- --></A><H3>

listen</H3>

<PRE>

protected abstract void <B>listen</B>(int&nbsp;backlog)

throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>

<DL>

<DD>Sets the maximum queue length for incoming connection indications

(a request to connect) to the <code>count</code> argument. If a

connection indication arrives when the queue is full, the

connection is refused.

将呼入连接指示(连接请求)的最大队列长度设置为backlog参数值。如果在队列已满情况下连接指示到达,连接请求被拒绝。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Parameters:</B><DD><CODE>backlog</CODE> - the maximum length of the queue. 队列的最大长度。

<DT><B>Throws:</B>

<DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs when creating the queue.

当创建队列时发生I/O错误则抛出。</DL>

</DD>

</DL>

<HR>

<A NAME="accept(java.net.SocketImpl)"><!-- --></A><H3>

accept</H3>

<PRE>

protected abstract void <B>accept</B>(<A HREF="../../java/net/SocketImpl.html" title="class in java.net">SocketImpl</A>&nbsp;s)

throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>

<DL>

<DD>Accepts a connection. 接收连接。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Parameters:</B><DD><CODE>s</CODE> - the accepted connection. 接收的连接。

<DT><B>Throws:</B>

<DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs when accepting the

connection. 当接收连接时发生I/O错误则抛出。</DL>

</DD>

</DL>

<HR>

<A NAME="getInputStream()"><!-- --></A><H3>

getInputStream</H3>

<PRE>

protected abstract <A HREF="../../java/io/InputStream.html" title="class in java.io">InputStream</A> <B>getInputStream</B>()

throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>

<DL>

<DD>Returns an input stream for this socket. 返回此套接字的输入流。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Returns:</B><DD>a stream for reading from this socket. 从此套接字读取的流。

<DT><B>Throws:</B>

<DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs when creating the

input stream. 当创建输入流时发生I/O错误则抛出。</DL>

</DD>

</DL>

<HR>

<A NAME="getOutputStream()"><!-- --></A><H3>

getOutputStream</H3>

<PRE>

protected abstract <A HREF="../../java/io/OutputStream.html" title="class in java.io">OutputStream</A> <B>getOutputStream</B>()

throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>

<DL>

<DD>Returns an output stream for this socket. 返回此套接字的输出流。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Returns:</B><DD>an output stream for writing to this socket. 写入此套接字的流。

<DT><B>Throws:</B>

<DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs when creating the

output stream. 当创建输出流时发生I/O错误则抛出。</DL>

</DD>

</DL>

<HR>

<A NAME="available()"><!-- --></A><H3>

available</H3>

<PRE>

protected abstract int <B>available</B>()

throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>

<DL>

<DD>Returns the number of bytes that can be read from this socket

without blocking. 返回从未阻塞的套接字读取的字节数。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Returns:</B><DD>the number of bytes that can be read from this socket

without blocking. 从未阻塞的套接字读取的字节数。

<DT><B>Throws:</B>

<DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs when determining the

number of bytes available. 当确定可用的字节数时发生I/O错误则抛出。</DL>

</DD>

</DL>

<HR>

<A NAME="close()"><!-- --></A><H3>

close</H3>

<PRE>

protected abstract void <B>close</B>()

throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>

<DL>

<DD>Closes this socket. 关闭套接字。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Throws:</B>

<DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs when closing this socket.</DL>

</DD>

</DL>

<HR>

<A NAME="shutdownInput()"><!-- --></A><H3>

shutdownInput</H3>

<PRE>

protected void <B>shutdownInput</B>()

throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>

<DL>

<DD>Places the input stream for this socket at "end of stream".

Any data sent to this socket is acknowledged and then

silently discarded.

If you read from a socket input stream after invoking

shutdownInput() on the socket, the stream will return EOF.

将套接字的输入流设置为位于“数据流末”。发送到套接字输入流端的任何数据将被确认且丢弃。

如果在调用shutdownInput()方法后从套接字输入流中读取,流将返回EOF。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Throws:</B>

<DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs when shutting down this

socket. 当关闭套接字时发生I/O错误则抛出。<DT><B>See Also:</B><DD><A HREF="../../java/net/Socket.html#shutdownOutput()"><CODE>Socket.shutdownOutput()</CODE></A>,

<A HREF="../../java/net/Socket.html#close()"><CODE>Socket.close()</CODE></A>,

<A HREF="../../java/net/Socket.html#setSoLinger(boolean, int)"><CODE>Socket.setSoLinger(boolean, int)</CODE></A></DL>

</DD>

</DL>

<HR>

<A NAME="shutdownOutput()"><!-- --></A><H3>

shutdownOutput</H3>

<PRE>

protected void <B>shutdownOutput</B>()

throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>

<DL>

<DD>Disables the output stream for this socket.

For a TCP socket, any previously written data will be sent

followed by TCP's normal connection termination sequence.

If you write to a socket output stream after invoking

shutdownOutput() on the socket, the stream will throw

an IOException.

取消此套接字的输出流。对于TCP套接字,任何已写入的数据被发送后,将正常关闭TCP连接。

如果在调用shutdownOutput()后向套接字输出流写入,流将抛出IOException。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Throws:</B>

<DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs when shutting down this

socket. 当关闭套接字时发生I/O错误则抛出。<DT><B>See Also:</B><DD><A HREF="../../java/net/Socket.html#shutdownInput()"><CODE>Socket.shutdownInput()</CODE></A>,

<A HREF="../../java/net/Socket.html#close()"><CODE>Socket.close()</CODE></A>,

<A HREF="../../java/net/Socket.html#setSoLinger(boolean, int)"><CODE>Socket.setSoLinger(boolean, int)</CODE></A></DL>

</DD>

</DL>

<HR>

<A NAME="getFileDescriptor()"><!-- --></A><H3>

getFileDescriptor</H3>

<PRE>

protected <A HREF="../../java/io/FileDescriptor.html" title="class in java.io">FileDescriptor</A> <B>getFileDescriptor</B>()</PRE>

<DL>

<DD>Returns the value of this socket's <code>fd</code> field.

返回此套接字fd成员变量的值。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Returns:</B><DD>the value of this socket's <code>fd</code> field. 此套接字fd成员变量的值。<DT><B>See Also:</B><DD><A HREF="../../java/net/SocketImpl.html#fd"><CODE>fd</CODE></A></DL>

</DD>

</DL>

<HR>

<A NAME="getInetAddress()"><!-- --></A><H3>

getInetAddress</H3>

<PRE>

protected <A HREF="../../java/net/InetAddress.html" title="class in java.net">InetAddress</A> <B>getInetAddress</B>()</PRE>

<DL>

<DD>Returns the value of this socket's <code>address</code> field.

返回此套接字address成员变量的值。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Returns:</B><DD>the value of this socket's <code>address</code> field. 此套接字address成员变量的值。<DT><B>See Also:</B><DD><A HREF="../../java/net/SocketImpl.html#address"><CODE>address</CODE></A></DL>

</DD>

</DL>

<HR>

<A NAME="getPort()"><!-- --></A><H3>

getPort</H3>

<PRE>

protected int <B>getPort</B>()</PRE>

<DL>

<DD>Returns the value of this socket's <code>port</code> field.

返回此套接字port成员变量的值。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Returns:</B><DD>the value of this socket's <code>port</code> field. 此套接字port成员变量的值。<DT><B>See Also:</B><DD><A HREF="../../java/net/SocketImpl.html#port"><CODE>port</CODE></A></DL>

</DD>

</DL>

<HR>

<A NAME="supportsUrgentData()"><!-- --></A><H3>

supportsUrgentData</H3>

<PRE>

protected boolean <B>supportsUrgentData</B>()</PRE>

<DL>

<DD>Returns whether or not this SocketImpl supports sending

urgent data. By default, false is returned

unless the method is overridden in a sub-class

判断此SocketImpl是否支持发送紧急数据。默认情况下,除非在子类中重载方法,否则返回false

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Returns:</B><DD>true if urgent data supported 如果支持紧急数据,返回true<DT><B>Since:</B></DT>

<DD>1.4</DD>

<DT><B>See Also:</B><DD><A HREF="../../java/net/SocketImpl.html#address"><CODE>address</CODE></A></DL>

</DD>

</DL>

<HR>

<A NAME="sendUrgentData(int)"><!-- --></A><H3>

sendUrgentData</H3>

<PRE>

protected abstract void <B>sendUrgentData</B>(int&nbsp;data)

throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>

<DL>

<DD>Send one byte of urgent data on the socket.

The byte to be sent is the low eight bits of the parameter

在套接字上发送一个字节的紧急数据。要发送的字节是参数的低八位。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Parameters:</B><DD><CODE>data</CODE> - The byte of data to send 要发送的数据字节

<DT><B>Throws:</B>

<DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if there is an error

sending the data. 发送数据时如果有错误则抛出。<DT><B>Since:</B></DT>

<DD>1.4</DD>

</DL>

</DD>

</DL>

<HR>

<A NAME="getLocalPort()"><!-- --></A><H3>

getLocalPort</H3>

<PRE>

protected int <B>getLocalPort</B>()</PRE>

<DL>

<DD>Returns the value of this socket's <code>localport</code> field. 返回此套接字localport成员变量的值。

<P>

<DD><DL>

</DL>

</DD>

<DD><DL>

<DT><B>Returns:</B><DD>the value of this socket's <code>localport</code> field. 此套接字localport成员变量的值。<DT><B>See Also:</B><DD><A HREF="../../java/net/SocketImpl.html#localport"><CODE>localport</CODE></A></DL>

</DD>

</DL>

<HR>

<A NAME="toString()"><!-- --></A><H3>

toString</H3>

<PRE>

public <A HREF="../../java/lang/String.html" title="class in java.lang">String</A> <B>toString</B>()</PRE>

<DL>

<DD>Returns the address and port of this socket as a <code>String</code>.

以字符串的形式返回套接字的地址和端口。

<P>

<DD><DL>

<DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></CODE></DL>

</DD>

<DD><DL>

<DT><B>Returns:</B><DD>a string representation of this socket. 此套接字的字符串形式。</DL>

</DD>

</DL>

<!-- ========= END OF CLASS DATA ========= -->

<HR>

<!-- ======= START OF BOTTOM NAVBAR ====== -->

<A NAME="navbar_bottom"><!-- --></A>

<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>

<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">

<TR>

<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">

<A NAME="navbar_bottom_firstrow"><!-- --></A>

<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">

<TR ALIGN="center" VALIGN="top">

<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>

<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>

<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>

<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SocketImpl.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>

<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>

<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>

<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>

</TR>

</TABLE>

</TD>

<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>

<b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.4.2</b></EM>

</TD>

</TR>

<TR>

<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">

&nbsp;<A HREF="../../java/net/SocketAddress.html" title="class in java.net"><B>PREV CLASS</B></A>&nbsp;

&nbsp;<A HREF="../../java/net/SocketPermission.html" title="class in java.net"><B>NEXT CLASS</B></A></FONT></TD>

<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">

<A HREF="../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;

&nbsp;<A HREF="SocketImpl.html" target="_top"><B>NO FRAMES</B></A> &nbsp;

&nbsp;<SCRIPT type="text/javascript">

<!--

if(window==top) {

document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');

}

//-->

</SCRIPT>

<NOSCRIPT>

<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>

</NOSCRIPT>

</FONT></TD>

</TR>

<TR>

<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">

SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>

<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">

DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>

</TR>

</TABLE>

<A NAME="skip-navbar_bottom"></A>

<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

<font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="../../../relnotes/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../../../relnotes/license.html">license terms</a>. Also see the <a href="http://java.sun.com/docs/redist.html">documentation redistribution policy</a>.</font>

</BODY>

</HTML>

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有