- 1、本文档共19页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
两台电脑实现连接(国外英文资料)
两台电脑实现连接(国外英文资料)
Within a unit or through wide-area protocol (such as x. 25) connected within the industry are tens or hundreds of thousands of computer interconnection, although use Intranet can create chat rooms, but realize point-to-point real-time conversation is difficult. I used Winsock and VB to make a set of chat and chat systems, which I used to refer to my peers.
One of Winsocks main properties, events, and methods
Winsock is a non-visible control, and the control file name is mswinsck.ocx, which is all called Mcirosoft Winsock control, which is used to tune this control into the toolkit.
1 attribute: Protocol = 0 / / use TCP Protocol;
RemoteHost / / ready to connect to the IP address of the remote machine
The IP port number of the RemotePort / / connection remote machine (1024-65535)
The LocalPort / / local machine listens for the IP port number that must be the same as the call port number
2: connect / / apply for the remote machine
Listen / / set the monitor
Accept / / establish an actual connection
Senddata / / send data
Getdata / / receive data
Close/close the connection
Event: a connectionrequest / / the other side of the request is generated when the connection is requested
Connect / / one player receives the connection
The other side of the closed / / / closed connection is produced by the other party
The dataArrival / / one party sends data from the other side
The error / / request connection is generated when the connection fails
Two ways
The article added two form form1 (mock client) and form2 (simulated server side) to the project.
The load control in form1:
The control of
The main properties
With the way
VB. Form form1
Caption = rechat room
Controlbox = 0 False
Simulate the client form
VB. The Textbox text1
Multiline = 1 True
Scrollbars = 3 Bath
The information that is used to enter the chat room
VB. The Textbox text2
Locked = 1 True
Multiline = 1 True
Scrollbars = 3 Bath
Displays the information from the chat room
VB.Com bobox combo1
Text = 1
文档评论(0)