文件名称:SimpleMultiChat
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2008-10-13
- 文件大小:
- 21.42kb
- 下载次数:
- 0次
- 提 供 者:
- 陳**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
在一個多人連線伺服器中,我們要有一個伺服端執行緒負責傾聽是否有客戶端連線,如果有客戶端連線,就指派一個客戶端執行緒專門應付這個客戶端連線,並在客戶端佇列中記錄它,然後進入下一個傾聽。
一個客戶端執行緒的工作,就是讀取客戶連線端的使用者輸入訊息,它不負責回應訊息,而是將讀到的訊息加入訊息佇列中,此外在我們的範例中,客戶端執行緒也負責自己的連線狀態,如果使用者中斷連線,客戶端執行緒會負責將自己從客戶端佇列中清除。
廣播執行緒負責取出訊息佇列中的訊息,然後將之一一傳送訊息給客戶端佇列中尚存在的客戶端執行緒。 -people in a line server, we have a servo - threads for listening to the client whether there are connections, if a client connections, assigned to a client threads devoted to cope with the client connections, and client sequences recorded it, and then listen to the next one. A client threads job is to read customer-line message to the user input, it is not responsible for responding to the message, but the message will be read by adding message stand out, in addition to our example, the client threads are responsible for their own connected, if the user interruption link, passenger households - threads will be responsible for their own from client sequences removed. Ogata responsible for the implementation of broadcasting the message out sequences of messages, and then one of a relay messa
一個客戶端執行緒的工作,就是讀取客戶連線端的使用者輸入訊息,它不負責回應訊息,而是將讀到的訊息加入訊息佇列中,此外在我們的範例中,客戶端執行緒也負責自己的連線狀態,如果使用者中斷連線,客戶端執行緒會負責將自己從客戶端佇列中清除。
廣播執行緒負責取出訊息佇列中的訊息,然後將之一一傳送訊息給客戶端佇列中尚存在的客戶端執行緒。 -people in a line server, we have a servo - threads for listening to the client whether there are connections, if a client connections, assigned to a client threads devoted to cope with the client connections, and client sequences recorded it, and then listen to the next one. A client threads job is to read customer-line message to the user input, it is not responsible for responding to the message, but the message will be read by adding message stand out, in addition to our example, the client threads are responsible for their own connected, if the user interruption link, passenger households - threads will be responsible for their own from client sequences removed. Ogata responsible for the implementation of broadcasting the message out sequences of messages, and then one of a relay messa
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 95302958simplemultichat.zip 列表 SimpleMultiChat/ SimpleMultiChat/bin/ SimpleMultiChat/bin/SimpleMultiChatClientUI.jar SimpleMultiChat/bin/SimpleMultiChatServerDemo.jar SimpleMultiChat/readme.txt SimpleMultiChat/src/ SimpleMultiChat/src/onlyfun/ SimpleMultiChat/src/onlyfun/caterpillar/ SimpleMultiChat/src/onlyfun/caterpillar/netapp/ SimpleMultiChat/src/onlyfun/caterpillar/netapp/SimpleMultiChatClientUI.java SimpleMultiChat/src/onlyfun/caterpillar/netapp/SimpleMultiChatServerDemo.java SimpleMultiChat/src/onlyfun/caterpillar/simplenet/ SimpleMultiChat/src/onlyfun/caterpillar/simplenet/multichat/ SimpleMultiChat/src/onlyfun/caterpillar/simplenet/multichat/SimpleMultiChatServer.java SimpleMultiChat/src/onlyfun/caterpillar/simplenet/multichat/SimpleMultiChatSubServer.java SimpleMultiChat/src/onlyfun/caterpillar/simplenet/SimpleConnectionClient.java