/**
* socket服务端的实现
*
* @author HongSoft
*/
public class ForumFileServer
{
static final int PORT=8000;
public static void main(String[] args)throws IOException
{
//启动 cacheMover线程,定时从cache中move掉部分过时的内容
ServerSocket s=new ServerSocket(PORT);
System.out.println("server started....");
try
{
while(true)
{
Socket socket=s.accept();
try
{
new PacketParserThread(socket);
}
catch(IOException e)
{
socket.close();
}
}
}
finally
{
s.close();
}
}
}
* socket服务端的实现
*
* @author HongSoft
*/
public class ForumFileServer
{
static final int PORT=8000;
public static void main(String[] args)throws IOException
{
//启动 cacheMover线程,定时从cache中move掉部分过时的内容
ServerSocket s=new ServerSocket(PORT);
System.out.println("server started....");
try
{
while(true)
{
Socket socket=s.accept();
try
{
new PacketParserThread(socket);
}
catch(IOException e)
{
socket.close();
}
}
}
finally
{
s.close();
}
}
}