c winsock.cls

来自「socket编程」· CLS 代码 · 共 48 行

CLS
48
字号
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "Winsock"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
'===========================================================================
'
' Winsock Class
'
' This class is a drop-in replacement to the Winsock control (MSWINSCK.OCX).
' Unlike the Winsock control, this class does NOT require a hosted form, and
' thus does not require a control array to Accept incoming connection
' requests. There are additional enhancements over the Winsock control
' interface, such as early-bound events (including events for arrays and
' collections of Winsock instances); optional quasi-synchronous non-blocking
' calls, and various other options providing more control over the socket
' communication process.
'
' Since this class mimics the Winsock control's functional interface almost
' exactly, you are able to use it in place of the Winsock control with
' little or no code changes.
'
' 04/10/2002 1. Broke interface to supply a default of -1 in the DataLen
'               parm of the SendData method, and to change the TimeoutValue
'               property to the SendTimeout and ReceiveTimeout properties.
'               Accordingly, the library was renamed from Winsock to
'               kvbWinsock.
'            2. Fixed bug w/Synchronous param in SendData method.
'            3. Fixed bug w/LocalIP property.
' 04/25/2002 1. Fixed failure to send/recv for Listening sockets.
'            2. Fixed crash when recv data into byte array.
' 04/27/2002 1. Added the KillerVB Live! Chat sample application.
'===========================================================================
'
' Author:             Monte Hansen [monte@killervb.com]
' Dependencies:       M+Winsock.Bas, M+Common.Bas & I+WinsockEvents.Cls
'
'===========================================================================
'
' * Copyright 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?