文件名称:Server
-
所属分类:
- 标签属性:
- 上传时间:2013-07-07
-
文件大小:23.52kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
聊天程序主要利用Java网络包中的服务器套接字和客户端套接字实现,其核心部分的实现思路如下:
服务器根据指定的端口创建服务器套接字,并在该端口侦听连接请求;
每一个新加入的客户端创建客户端套接字,与服务器进行连接;
每一个连接在服务器有一个连接池保持连接;
当其中的一个客户端发出群聊或者上线下线信息后,对应的连接的服务器程序在接收到该消息后,向其所维持的所有的客户连接广播该消息。当客户端发出单独聊天,文件传输等需要发给指定用户的消息时,服务器端遍历连接池找到对应客户端,将消息单独发给该客户端。-Chat program using mainly Java network package server socket and client socket implementation, the core part of the implementation ideas are as follows: the server according to the specified port to create a server socket and listens for connection requests on this port each a new client create a client socket connection with the server each one connected to the server has a connection pool to stay connected When one client sends a group chat or offline on-line information, the corresponding connection server program receives the message, to maintain all of its client connection broadcasts the message. When the client makes a separate chat, file transfer and other users need to specify a message sent to the server-side connection pooling find the corresponding traversal client, the message is sent separately to the client.
服务器根据指定的端口创建服务器套接字,并在该端口侦听连接请求;
每一个新加入的客户端创建客户端套接字,与服务器进行连接;
每一个连接在服务器有一个连接池保持连接;
当其中的一个客户端发出群聊或者上线下线信息后,对应的连接的服务器程序在接收到该消息后,向其所维持的所有的客户连接广播该消息。当客户端发出单独聊天,文件传输等需要发给指定用户的消息时,服务器端遍历连接池找到对应客户端,将消息单独发给该客户端。-Chat program using mainly Java network package server socket and client socket implementation, the core part of the implementation ideas are as follows: the server according to the specified port to create a server socket and listens for connection requests on this port each a new client create a client socket connection with the server each one connected to the server has a connection pool to stay connected When one client sends a group chat or offline on-line information, the corresponding connection server program receives the message, to maintain all of its client connection broadcasts the message. When the client makes a separate chat, file transfer and other users need to specify a message sent to the server-side connection pooling find the corresponding traversal client, the message is sent separately to the client.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Server/build/built-jar.properties
Server/build/classes/.netbeans_automatic_build
Server/build/classes/.netbeans_update_resources
Server/build/classes/server/CS.class
Server/build/classes/server/Server.class
Server/build.xml
Server/deny.txt
Server/dist/README.TXT
Server/dist/Server.jar
Server/manifest.mf
Server/nbproject/build-impl.xml
Server/nbproject/genfiles.properties
Server/nbproject/private/private.properties
Server/nbproject/private/private.xml
Server/nbproject/project.properties
Server/nbproject/project.xml
Server/src/server/CS.java
Server/src/server/Server.java
Server/user.txt
Server/build/classes/server
Server/build/generated-sources/ap-source-output
Server/build/classes
Server/build/empty
Server/build/generated-sources
Server/nbproject/private
Server/src/server
Server/build
Server/dist
Server/nbproject
Server/src
Server
Server/build/classes/.netbeans_automatic_build
Server/build/classes/.netbeans_update_resources
Server/build/classes/server/CS.class
Server/build/classes/server/Server.class
Server/build.xml
Server/deny.txt
Server/dist/README.TXT
Server/dist/Server.jar
Server/manifest.mf
Server/nbproject/build-impl.xml
Server/nbproject/genfiles.properties
Server/nbproject/private/private.properties
Server/nbproject/private/private.xml
Server/nbproject/project.properties
Server/nbproject/project.xml
Server/src/server/CS.java
Server/src/server/Server.java
Server/user.txt
Server/build/classes/server
Server/build/generated-sources/ap-source-output
Server/build/classes
Server/build/empty
Server/build/generated-sources
Server/nbproject/private
Server/src/server
Server/build
Server/dist
Server/nbproject
Server/src
Server
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.