| Consts | Events | Types | Fields | Properties | Methods | Details | SMom |
| Event Summary | |
Public |
OnClose()
|
Public |
OnConnect()
|
Public |
OnConnectionRequest( ByVal requestID As Long)
|
Public |
OnDataArrival( ByVal bytesTotal As Long)
|
Public |
OnError( ByVal Number As Integer, Description As String, ByVal l As Long, ByVal l As String, ByVal l As String, ByVal l As Long, CancelDisplay As Boolean)
|
Public |
OnSendComplete()
|
Public |
OnSendProgress( ByVal bytesSent As Long, ByVal l As Long)
|
| Types Summary | |
Public |
enmAddressFamilyEnum enmAddressFamily |
Public |
enmSocketOptionsEnum enmSocketOptions |
Public |
enmSocketProtocolEnum enmSocketProtocol |
Public |
enmSocketTypeEnum enmSocketType |
Public |
ErrorConstantsEnum ErrorConstants |
Private |
InternalStateConstantsEnum InternalStateConstants |
Public |
ProtocolConstantsEnum ProtocolConstants |
Public |
StateConstantsEnum StateConstants |
| Field Summary | |
Private(enmAddressFamily) |
AddressFamily
|
Public(Boolean) |
CatchErrors
|
Private(Long 'value returned by the RecvDataToBuffer function) |
lngBytesReceived
|
Private(Long 'value returned by the accept Winsock API function) |
lngNewSocket
|
Private(Long 'value returned by the getsockname Winsock API function) |
lngRetValue
|
Private(Long 'value returned by the connect Winsock API function) |
lngRetValue
|
Private(Long) |
m_lngBytesReceived
|
Private(Long) |
m_lngRequestID
|
Private(InternalStateConstants) |
m_varInternalState
|
Private(Boolean 'Added: 09-JULY-2002) |
mblnBroadcast
|
Private(Boolean 'Added: 12-SEP-2002) |
mblnSendFlag
|
Private(Boolean 'Added: 10-MAR-2002) |
mblnSocketIsBound
|
Private(Long) |
mlngLastErrorCode
|
Private(Long) |
mlngMaxMsgSize
|
Private(Long) |
mlngRecvBufferLen
|
Private(Long) |
mlngSendBufferLen
|
Private(Long) |
mlngSocketID
|
Private(CRemoteHost) |
mLocalHost
|
Private(enmSocketProtocol) |
mProtocollo
|
Private(CRemoteHost) |
mRemoteHost
|
Private(String) |
mstrLastError
|
Private(String) |
mstrRecvBuffer
|
Private(String) |
mstrSendBuffer
|
Private(ProtocolConstants) |
mvarProtocol
|
Private(StateConstants) |
mvarState
|
Private(enmSocketType) |
SocketType
|
Private(SOCK_ADDR 'socket address - used by the connect Winsock API function) |
udtAddress
|
Private(SOCK_ADDR 'remote socket address for the accept Winscok API function) |
udtSockAddr
|
| Properties Summary | |
Get Public(Long) |
Property Get BytesReceived()Codice |
Get Public(Boolean) |
Property Get IsBound()Codice |
Get Public(Boolean) |
Property Get IsCreated()Codice |
Get Public(Boolean) |
Property Get IsOpen()Codice |
Get Public(String) |
Property Get LastError()Codice |
Get Public(Long) |
Property Get LastErrorCode()Codice |
Get Public(CRemoteHost) |
Property Get LocalHost()Codice |
Get Public(ProtocolConstants) |
Property Get Protocol()Codice |
Get Public(CRemoteHost) |
Property Get RemoteHost()Codice |
Get Public(Long) |
Property Get SocketHandle()Codice |
Get Public(Long) |
Property Get SocketID()Codice |
Get Public(StateConstants) |
Property Get State()Codice |
| Method Summary | |
Public(Boolean) |
Accept( requestID As Long)Codice |
Public(CSocket) |
AcceptNextConnection( requestID As Long)Codice |
Public(Boolean) |
Bind( Optional LocalHostDescription As CRemoteHost, Optional l As Boolean)Codice |
Private |
Class_Initialize()Codice |
Private |
Class_Terminate()Codice |
Public |
CloseSocket()Codice |
Public(Boolean) |
Connect( Optional RemoteHostDescription As CRemoteHost)Codice |
Public(Boolean) |
Create( Optional ByVal l As enmAddressFamily, Optional l As enmSocketType)Codice |
Private |
DestroySocket()Codice |
Private |
GenerateError( Description As String, Optional l As Long)Codice |
Private |
GenerateErrorGenerico( Procedure As String)Codice |
Public(Boolean) |
GetData( varData As Variant, Optional l As Variant, Optional l As Variant)Codice |
Private(Variant) |
GetLastErrorCode( Optional ByVal l As String)Codice |
Private |
GetWinsockBuffers()Codice |
Public(Boolean) |
IsDataAvailable()Codice |
Public(Boolean) |
Listen()Codice |
Private |
mRemoteHost_OnChangeIPAddress()Codice |
Public(Boolean) |
OpenClientTCPConnection( Optional ResetLocalPort As Boolean)Codice |
Public(Boolean) |
OpenClientUDPConnection()Codice |
Public(Boolean) |
OpenFromReqID( requestID As Long)Codice |
Public(Boolean) |
OpenServerConnection()Codice |
Public |
PeekData( varData As Variant, Optional l As Variant, Optional l As Variant)Codice |
Private(Long) |
RecvData( varData As Variant, blnPeek As Boolean, Optional l As Variant, Optional l As Variant)Codice |
Private(Long) |
RecvDataToBuffer()Codice |
Private(Boolean) |
SendBufferedData()Codice |
Public(Boolean) |
SendData( varData As Variant)Codice |
| Details |
Public Event OnClose()
Public Event OnConnect()
Public Event OnConnectionRequest(ByVal requestID As Long)
Public Event OnDataArrival(ByVal bytesTotal As Long)
Public Event OnError(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
Public Event OnSendComplete()
Public Event OnSendProgress(ByVal bytesSent As Long, ByVal bytesRemaining As Long)
Public Enum enmAddressFamily
AF_UNSPEC = 0 '/* unspecified */
AF_UNIX = 1 '/* local to host (pipes, portals) */
AF_INET = 2 '/* internetwork: UDP, TCP, etc. */
AF_IMPLINK = 3 '/* arpanet imp addresses */
AF_PUP = 4 '/* pup protocols: e.g. BSP */
AF_CHAOS = 5 '/* mit CHAOS protocols */
AF_NS = 6 '/* XEROX NS protocols */
AF_IPX = AF_NS '/* IPX protocols: IPX, SPX, etc. */
AF_ISO = 7 '/* ISO protocols */
AF_OSI = AF_ISO '/* OSI is ISO */
AF_ECMA = 8 '/* european computer manufacturers */
AF_DATAKIT = 9 '/* datakit protocols */
AF_CCITT = 10 '/* CCITT protocols, X.25 etc */
AF_SNA = 11 '/* IBM SNA */
AF_DECnet = 12 '/* DECnet */
AF_DLI = 13 '/* Direct data link interface */
AF_LAT = 14 '/* LAT */
AF_HYLINK = 15 '/* NSC Hyperchannel */
AF_APPLETALK = 16 '/* AppleTalk */
AF_NETBIOS = 17 '/* NetBios-style addresses */
AF_VOICEVIEW = 18 '/* VoiceView */
AF_FIREFOX = 19 '/* Protocols from Firefox */
AF_UNKNOWN1 = 20 '/* Somebody is using this! */
AF_BAN = 21 '/* Banyan */
AF_ATM = 22 '/* Native ATM Services */
AF_INET6 = 23 '/* Internetwork Version 6 */
AF_CLUSTER = 24 '/* Microsoft Wolfpack */
AF_12844 = 25 '/* IEEE 1284.4 WG AF */
AF_MAX = 26
End Enum
Public Enum enmSocketOptions
SO_DEBUG = &H1& ' Turn on debugging info recording
SO_ACCEPTCONN = &H2& ' Socket has had listen() - READ-ONLY.
SO_REUSEADDR = &H4& ' Allow local address reuse.
SO_KEEPALIVE = &H8& ' Keep connections alive.
SO_DONTROUTE = &H10& ' Just use interface addresses.
SO_BROADCAST = &H20& ' Permit sending of broadcast msgs.
SO_USELOOPBACK = &H40& ' Bypass hardware when possible.
SO_LINGER = &H80& ' Linger on close if data present.
SO_OOBINLINE = &H100& ' Leave received OOB data in line.
SO_DONTLINGER = Not SO_LINGER
SO_EXCLUSIVEADDRUSE = Not SO_REUSEADDR ' Disallow local address reuse.
' Additional options.
SO_SNDBUF = &H1001& ' Send buffer size.
SO_RCVBUF = &H1002& ' Receive buffer size.
SO_ERROR = &H1007& ' Get error status and clear.
SO_TYPE = &H1008& ' Get socket type - READ-ONLY.
End Enum
Public Enum enmSocketProtocol
IPPROTO_IP = 0 '/* dummy for IP */
IPPROTO_ICMP = 1 '/* control message protocol */
IPPROTO_IGMP = 2 '/* internet group management protocol */
IPPROTO_GGP = 3 '/* gateway^2 (deprecated) */
IPPROTO_TCP = 6 '/* tcp */
IPPROTO_PUP = 12 '/* pup */
IPPROTO_UDP = 17 '/* user datagram protocol */
IPPROTO_IDP = 22 '/* xns idp */
IPPROTO_ND = 77 '/* UNOFFICIAL net disk proto */
IPPROTO_RAW = 255 '/* raw IP packet */
IPPROTO_MAX = 256
End Enum
Public Enum enmSocketType
SOCK_STREAM = 1 ' /* stream socket */
SOCK_DGRAM = 2 ' /* datagram socket */
SOCK_RAW = 3 ' /* raw-protocol interface */
SOCK_RDM = 4 ' /* reliably-delivered message */
SOCK_SEQPACKET = 5 ' /* sequenced packet stream */
End Enum
Public Enum ErrorConstants
sckAddressInUse = 10048
sckAddressNotAvailable = 10049
sckAlreadyComplete = 10037
sckAlreadyConnected = 10056
sckBadState = 40006
sckConnectAborted = 10053
sckConnectionRefused = 10061
sckConnectionReset = 10054
sckGetNotSupported = 394
sckHostNotFound = 11001
sckHostNotFoundTryAgain = 11002
sckInProgress = 10036
sckInvalidArg = 40014
sckInvalidArgument = 10014
sckInvalidOp = 40020
sckInvalidPropertyValue = 380
sckMsgTooBig = 10040
sckNetReset = 10052
sckNetworkSubsystemFailed = 10050
sckNetworkUnreachable = 10051
sckNoBufferSpace = 10055
sckNoData = 11004
sckNonRecoverableError = 11003
sckNotConnected = 10057
sckNotInitialized = 10093
sckNotSocket = 10038
sckOpCanceled = 10004
sckOutOfMemory = 7
sckOutOfRange = 40021
sckPortNotSupported = 10043
sckSetNotSupported = 383
sckSocketShutdown = 10058
sckSuccess = 40017
sckTimedout = 10060
sckUnsupported = 40018
sckWouldBlock = 10035
sckWrongProtocol = 40026
End Enum
Private Enum InternalStateConstants
istConnecting
istSendingDatagram
End Enum
Public Enum ProtocolConstants
sckTCPProtocol = 0
sckUDPProtocol = 1
End Enum
Public Enum StateConstants
sckClosed = 0
sckOpen = 1
sckListening = 2
sckConnectionPending = 3
sckResolvingHost = 4
sckHostResolved = 5
sckConnecting = 6
sckConnected = 7
sckClosing = 8
sckError = 9
End Enum
Private AddressFamily As enmAddressFamily
Public CatchErrors As Boolean
Dim lngBytesReceived As Long 'value returned by the RecvDataToBuffer function
Dim lngNewSocket As Long 'value returned by the accept Winsock API function
Dim lngRetValue As Long 'value returned by the getsockname Winsock API function
Dim lngRetValue As Long 'value returned by the connect Winsock API function
Private m_lngBytesReceived As Long
Private m_lngRequestID As Long
Private m_varInternalState As InternalStateConstants
Private mblnBroadcast As Boolean 'Added: 09-JULY-2002
Private mblnSendFlag As Boolean 'Added: 12-SEP-2002
Private mblnSocketIsBound As Boolean 'Added: 10-MAR-2002
Private mlngLastErrorCode As Long
Private mlngMaxMsgSize As Long
Private mlngRecvBufferLen As Long
Private mlngSendBufferLen As Long
Private mlngSocketID As Long
Private WithEvents mLocalHost As CRemoteHost
Private mProtocollo As enmSocketProtocol
Private WithEvents mRemoteHost As CRemoteHost
Private mstrLastError As String
Private mstrRecvBuffer As String
Private mstrSendBuffer As String
Private mvarProtocol As ProtocolConstants
Private mvarState As StateConstants
Private SocketType As enmSocketType
Dim udtAddress As SOCK_ADDR 'socket address - used by the connect Winsock API function
Dim udtSockAddr As SOCK_ADDR 'remote socket address for the accept Winscok API function
Public Property Get BytesReceived() As Long
Public Property Get IsBound() As Boolean
Public Property Get IsCreated() As Boolean
Public Property Get IsOpen() As Boolean
Public Property Get LastError() As String
Private Property Let LastError(newValue As String)
Public Property Get LastErrorCode() As Long
Public Property Get LocalHost() As CRemoteHost
Private Property Set LocalHost(newValue As CRemoteHost)
Public Property Get Protocol() As ProtocolConstants
Public Property Let Protocol(newValue As ProtocolConstants)
Public Property Get RemoteHost() As CRemoteHost
Private Property Set RemoteHost(newValue As CRemoteHost)
Public Property Get SocketHandle() As Long
Public Property Get SocketID() As Long
Private Property Let SocketID(newValue As Long)
Public Property Get State() As StateConstants
Public Function Accept(requestID As Long) As Boolean
Public Function AcceptNextConnection(requestID As Long) As CSocket
Public Function Bind(Optional LocalHostDescription As CRemoteHost = Nothing, Optional ReusePort As Boolean = True) As Boolean
Private Sub Class_Initialize()
Private Sub Class_Terminate()
Public Sub CloseSocket()
Public Function Connect(Optional RemoteHostDescription As CRemoteHost = Nothing) As Boolean
Public Function Create(Optional ByVal af As enmAddressFamily = AF_INET, Optional ByVal st As enmSocketType = SOCK_STREAM) As Boolean
Private Sub DestroySocket()
Private Sub GenerateError(Description As String, Optional Number As Long = vbObjectError)
Private Sub GenerateErrorGenerico(Procedure As String)
Public Function GetData(varData As Variant, Optional VarType As Variant, Optional maxLen As Variant) As Boolean
Private Function GetLastErrorCode(Optional ByVal strAdditionalInfo As String)
Private Sub GetWinsockBuffers()
Public Function IsDataAvailable() As Boolean
Public Function Listen() As Boolean
Private Sub mRemoteHost_OnChangeIPAddress()
Public Function OpenClientTCPConnection(Optional ResetLocalPort As Boolean = True) As Boolean
Public Function OpenClientUDPConnection() As Boolean
Public Function OpenFromReqID(requestID As Long) As Boolean
Public Function OpenServerConnection() As Boolean
Public Sub PeekData(varData As Variant, Optional VarType As Variant, Optional maxLen As Variant)
Private Function RecvData(varData As Variant, blnPeek As Boolean, Optional VarType As Variant, Optional maxLen As Variant) As Long
Private Function RecvDataToBuffer() As Long
Private Function SendBufferedData() As Boolean
Public Function SendData(varData As Variant) As Boolean
| Consts | Events | Types | Fields | Properties | Methods | Details | SMom |