首页 | 本学科首页   官方微博 | 高级检索  
     

基于Winsock的Chat设计
引用本文:王金保.基于Winsock的Chat设计[J].辽宁石油化工大学学报,2004,24(4):60-62.
作者姓名:王金保
作者单位:辽宁石油化工大学,辽宁,抚顺,113001
摘    要:网上Chat是Internet十分普通的一个应用,利用Socket聊天室的基本原理,根据HTML规范,当接收到浏览器的请求后,模仿WWW服务器的响应,将聊天内容发送回浏览器,就像浏览一个很大的页面始终处于页面的连接状态。叙述了WindowsSocket套接口应用,流式套接口、数据报套接口和原始套接口3类套接口的差别,Winsock控件的作用,给出了面向连接套接口应用程序数据流程图。对于分布式环境常用的客户机/服务器模型,客户应用程序向服务器程序请求服务,协议可以是对称的,也可以是不对称的,连接客户机/服务器的服务也可以通过数据报套接口提供。按客户机/服务器模型,应用VB6.0设计了一个Chat软件的窗体和其它模块,并附上服务器端代码例子。

关 键 词:套接口  Winsock  聊天室  窗体
文章编号:1672-6952(2004)04-0060-03
修稿时间:2004年3月15日

Designing for Chat Based on Winsock
WANG Jin-bao.Designing for Chat Based on Winsock[J].Journal of Liaoning University of Petroleum & Chemical Technology,2004,24(4):60-62.
Authors:WANG Jin-bao
Abstract:The chat is a very popular application of Internet. In terms of HTML criteria and basic principles of socket chat, when a request of browser is received, the chat contents will be sent back to the browser by simulating the response of WWW server as if browsing a huge Web page is online all the time. The application of Windows Socket, the differences among flow socket, data socket and original socket, and the use of Winsock widgets were described. A data flow chat of the application facing joint socket was given. For the usual client/server model of distribution environment, if a client application program asks server program for service, the protocol can be either symmetrical or non-symmetrical. Service that connects client/server can be provided by data socket. According to the model of client/server, a chat forms and other modules were designed by VB6.0. An example of server port codes was attached.
Keywords:Socket  Winsock  Chat  Windows
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号