📄 cserverthread.html
字号:
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="stop_sSocket"><!-- --></A><H3>
stop_sSocket</H3>
<PRE>
boolean <B>stop_sSocket</B></PRE>
<DL>
<DD>If it is true this thread will stop.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="cs"><!-- --></A><H3>
cs</H3>
<PRE>
java.net.Socket <B>cs</B></PRE>
<DL>
<DD>Point to the socket which is created by the client's CmainFrame_ServerThread. The socket will transact the communication between the client and the connected peer.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="cs_in"><!-- --></A><H3>
cs_in</H3>
<PRE>
java.lang.String <B>cs_in</B></PRE>
<DL>
<DD>Contain the message sent by the connected peer.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="csf"><!-- --></A><H3>
csf</H3>
<PRE>
<A HREF="CserverFrame.html" title="class in <Unnamed>">CserverFrame</A> <B>csf</B></PRE>
<DL>
<DD>Point to the CmainFrame's csf. When this thread is initialized it will tell the csf to add the connected peer to its list.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="ccrf"><!-- --></A><H3>
ccrf</H3>
<PRE>
<A HREF="CreceiveIDMEF.html" title="class in <Unnamed>">CreceiveIDMEF</A> <B>ccrf</B></PRE>
<DL>
<DD>When the peer want to send a XML IDMEF file,this window will be open.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="conningname"><!-- --></A><H3>
conningname</H3>
<PRE>
java.lang.String <B>conningname</B></PRE>
<DL>
<DD>The connected peer's username.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="cs_dis"><!-- --></A><H3>
cs_dis</H3>
<PRE>
java.io.DataInputStream <B>cs_dis</B></PRE>
<DL>
<DD>Point to cs's DataInputStream
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="cs_dos"><!-- --></A><H3>
cs_dos</H3>
<PRE>
java.io.DataOutputStream <B>cs_dos</B></PRE>
<DL>
<DD>Point to cs's DataOutputStream
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="cxp"><!-- --></A><H3>
cxp</H3>
<PRE>
<A HREF="ClientXMLParser.html" title="class in <Unnamed>">ClientXMLParser</A> <B>cxp</B></PRE>
<DL>
<DD>Use DOM parse XML message which send from the peer.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="filename_s"><!-- --></A><H3>
filename_s</H3>
<PRE>
java.lang.String <B>filename_s</B></PRE>
<DL>
<DD>The name of the file which will be send by the peer.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="file_out"><!-- --></A><H3>
file_out</H3>
<PRE>
java.io.FileOutputStream <B>file_out</B></PRE>
<DL>
<DD>The stream to write file.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="file_ss"><!-- --></A><H3>
file_ss</H3>
<PRE>
java.net.ServerSocket <B>file_ss</B></PRE>
<DL>
<DD>When one peer want to send file to this client, the client will get an unused port to listen to the peer's connect request.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="file_soc"><!-- --></A><H3>
file_soc</H3>
<PRE>
java.net.Socket <B>file_soc</B></PRE>
<DL>
<DD>When one peer get the open port number, it will connect the client ,if the file_ss accept() the file_soc will get the socket.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="fileport_b"><!-- --></A><H3>
fileport_b</H3>
<PRE>
boolean <B>fileport_b</B></PRE>
<DL>
<DD>Whether get an unused port.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="fileport_num"><!-- --></A><H3>
fileport_num</H3>
<PRE>
int <B>fileport_num</B></PRE>
<DL>
<DD>Try from 65535 to lower until find an unused port.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="filesize"><!-- --></A><H3>
filesize</H3>
<PRE>
long <B>filesize</B></PRE>
<DL>
<DD>The length of the file.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="receivedsize"><!-- --></A><H3>
receivedsize</H3>
<PRE>
long <B>receivedsize</B></PRE>
<DL>
<DD>How many bytes of the file have been received.
<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">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="CserverThread(java.net.Socket, CserverFrame)"><!-- --></A><H3>
CserverThread</H3>
<PRE>
<B>CserverThread</B>(java.net.Socket s,
<A HREF="CserverFrame.html" title="class in <Unnamed>">CserverFrame</A> sf)</PRE>
<DL>
<DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - The socket which is created by the client's CmainFrame_ServerThread.<DD><CODE>sf</CODE> - CmainFrame's csf.</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="run()"><!-- --></A><H3>
run</H3>
<PRE>
public void <B>run</B>()</PRE>
<DL>
<DD>After the thread start,the client continue to read the peer's sended message.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>run</CODE> in interface <CODE>java.lang.Runnable</CODE><DT><B>Overrides:</B><DD><CODE>run</CODE> in class <CODE>java.lang.Thread</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="s_parser()"><!-- --></A><H3>
s_parser</H3>
<PRE>
public void <B>s_parser</B>()</PRE>
<DL>
<DD>Call ClientXMLParser to parse the peer's XML message can perform the action.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="CserverThreadclose()"><!-- --></A><H3>
CserverThreadclose</H3>
<PRE>
public void <B>CserverThreadclose</B>()</PRE>
<DL>
<DD>Close the CserverThread thread.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getport()"><!-- --></A><H3>
getport</H3>
<PRE>
public void <B>getport</B>()</PRE>
<DL>
<DD>Start thread CfilesendThread2 to find an unused port.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="write_file()"><!-- --></A><H3>
write_file</H3>
<PRE>
public void <B>write_file</B>()</PRE>
<DL>
<DD>Start thread CfilesendThread1 to continue to receive the file.
<P>
<DD><DL>
</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=2 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="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CserverThread.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="CserverFrameMsg.html" title="class in <Unnamed>"><B>PREV CLASS</B></A>
<A HREF="Csignature.html" title="class in <Unnamed>"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="index.html?CserverThread.html" target="_top"><B>FRAMES</B></A>
<A HREF="CserverThread.html" target="_top"><B>NO FRAMES</B></A>
<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: <A HREF="#nested_classes_inherited_from_class_java.lang.Thread">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -