Welcome![Sign In][Sign Up]
Location:
Search - OnServerAccept

Search list

[Windows Developtalkroom

Description: 1.其中基于UDP做的聊天室,利用UDP广播,只需在局域网里启动exe即可工作,无需服务器端。开发思想:在“上线”后启动一个线程循环recv接受广播来的信息。"send"按钮广播信息。 2.基于TCP的聊天室。采用了WSAAsyncSelect无阻塞消息模式。先启动服务ChatRoomServer.exe 在启动server后,服务器端listen来自客户端的信息,当客户端connection后,服务器端accpet与客户端建立连接后触发消息函数 OnServerAccept。OnServerAccept再次利用WSAAsyncSelect函数判断并接受recv客户端发来的信息并广播,以达到聊天室的效果。-1. Which do UDP-based chat rooms, use of UDP broadcasts, simply start the exe in the LAN where you can work without the need for server-side. Development of thought: in the " on line" start a thread loop to recv receiving broadcast information. " send" button to broadcast information. 2. TCP-based chat rooms. WSAAsyncSelect using non-blocking message mode. First start the service ChatRoomServer.exe start server, the server-side listen to the information from the client side, when a client connection, the server-side accpet the client to establish a connection with the trigger message function OnServerAccept. OnServerAccept reuse WSAAsyncSelect and accept the recv function is to determine the client sent the information and broadcasting, in order to achieve the effect of chat rooms.
Platform: | Size: 1856512 | Author: zhuceyong | Hits:

[CommunicationTCPChatRoom

Description: 基于TCP的聊天室。采用了WSAAsyncSelect无阻塞消息模式。先启动服务ChatRoomServer.exe 在启动server后,服务器端listen来自客户端的信息,当客户端connection后,服务器端accpet与客户端建立连接后触发消息函数 OnServerAccept。OnServerAccept再次利用WSAAsyncSelect函数判断并接受recv客户端发来的信息并广播,以达到聊天室的效果-TCP-based chat room. WSAAsyncSelect message mode using non-blocking. Service ChatRoomServer.exe first start after the boot server, the server-side information from the client listen, when a client connection, the server-side accpet to establish connection with the client to trigger a message function OnServerAccept. OnServerAccept reuse WSAAsyncSelect recv function to judge and accept the client sent information and broadcasting, in order to achieve the effect of chat rooms
Platform: | Size: 87040 | Author: 韩静 | Hits:

CodeBus www.codebus.net