1. 8000
2. 查一下 Socket 构造函数的说明就知道了
3. Server DataInputStream in=null;
PrintStream out=null; Client
BufferedReader in=null;
PrintWriter out=null;4. while(!str.equals("quit"))
{
System.out.println("Client said:"+str);
str=in.readLine();
}
2. 查一下 Socket 构造函数的说明就知道了
3. Server DataInputStream in=null;
PrintStream out=null; Client
BufferedReader in=null;
PrintWriter out=null;4. while(!str.equals("quit"))
{
System.out.println("Client said:"+str);
str=in.readLine();
}
解决方案 »
- 关于flex项目中,java后台如何向前台传递大数据的问题
- struts2中使用<s:checkboxlist>问题
- js.jar包是干什么用的,官网是多少
- 在哪里可以下载myfaces-extensions.jar
- servlet中的跳转问题,急急急,在线等
- 关于EJB3.0 实体Bean的操作,反序列化出错
- 有一个java 问题一直困扰着我,请java高手指点。
- 怎么样可以不需要登陆访问权限页面?
- Spring例子中的Jpetstore有谁看过?
- 所谓的“精通EJB第二版”是哪个出版社的,主编又是谁啊?
- 一个超简单小问题,但你未必能正确回答哦
- JB9中make一个EJB时遇到的一个问题,请各位帮帮忙,在线等
2. 本地计算机(即自己的机器)
3.DataInputStream PrintStream
BufferedReader PrintWriter
4.soc=svrsoc.accept();
1。8000
2.服务端的主机
3。我不清楚,初学java,分不太清楚这些流,请大家指教
4.应该是停在try这里,具体是那个语句,我不清楚,请教大家
{
System.out.println("Client said:"+str);
str=in.readLine();
}
应该是这个解吧?
public Socket accept()
throws IOException
Listens for a connection to be made to this socket and accepts it. The method blocks until a connection is made.
A new Socket s is created and, if there is a security manager, the security manager's checkAccept method is called with s.getInetAddress().getHostAddress() and s.getPort() as its arguments to ensure the operation is allowed. This could result in a SecurityException.
楼主多看看javadoc吧
其实都不难的
1. 8000
2. 用來做服務器的主機
3.DataInputStream PrintStream
BufferedReader PrintWriter
4.svrsoc.accept();
2.本地机
3.DataInputStream PrintStream
BufferedReader PrintWriter
4.System.out.println("Client said:"+str);
2. 本机
3.DataInputStream PrintStream
BufferedReader PrintWriter
4.soc=svrsoc.accept();
localhost是服务器地址(或ip)!!!
你也别得意,localhost本来就是本机地址吗,
只是它所表明的意义是代表服务器地址(或ip)
别把自己看得太高,不过白痴一个,自欺欺人
最后提醒﹐不要被localhost這個名詞給騙了。看來之世道不會英語就會少麻煩哦