Public Sub IRCSocketDisconnect(ByVal sQuit As String)
On Error Resume Next
'
If IRCSocket.State = sckConnected Then
IRCSocket.SendData "QUIT :" & sQuit & vbCrLf
'
Set tmrCloseSock = New CLiteTimer
tmrCloseSock.Interval = 20
tmrCloseSock.Enabled = True
ElseIf IRCSocket.State = sckConnecting Or IRCSocket.State = sckResolvingHost Then
blClose = True
RaiseEvent IRCSocketCancel
IRCSocket.CloseSocket
End If
End Sub
'socket senddata routine
Public Sub IRCSocketSendData(ByVal sData As String)
On Error Resume Next
'
If IRCSocket.State = sckConnected Then IRCSocket.SendData sData
'
End Sub
'local socket properties
Public Property Get IRCSocketState() As StateConstants
On Error Resume Next
'
IRCSocketState = IRCSocket.State
'
End Property
Public Property Get IRCSocketLocalHostName() As String
On Error Resume Next
'
IRCSocketLocalHostName = IRCSocket.LocalHostName
'
End Property
Public Property Get IRCSocketRemoteHost() As String
On Error Resume Next
'
IRCSocketRemoteHost = IRCSocket.RemoteHost
'
End Property
Public Property Get IRCSocketRemoteHostIP() As String
On Error Resume Next
'
IRCSocketRemoteHostIP = IRCSocket.RemoteHostIP
'
End Property
Public Property Get IRCSocketLocalIP() As String
On Error Resume Next
'
IRCSocketLocalIP = IRCSocket.LocalIP
'
End Property
Public Property Get IRCSocketRemotePort() As Long
On Error Resume Next
'
IRCSocketRemotePort = IRCSocket.RemotePort
'
End Property
Public Property Let IRCSocketRemotePort(sNewValue As Long)
On Error Resume Next
'
IRCSocket.RemotePort = sNewValue
'
End Property
Public Property Let IRCSocketRemoteHost(sNewValue As String)
On Error Resume Next
'
IRCSocket.RemoteHost = sNewValue
'
End Property
Public Property Get IRCSocketProtocol() As ProtocolConstants
On Error Resume Next
'
IRCSocketProtocol = IRCSocket.Protocol
'
End Property
Public Property Let IRCSocketProtocol(sNewValue As ProtocolConstants)
On Error Resume Next
'
IRCSocket.Protocol = sNewValue
'
End Property
Public Property Get IRCSocketLocalPort() As Long
On Error Resume Next
'
IRCSocketLocalPort = IRCSocket.LocalPort
'
End Property
Public Property Let IRCSocketLocalPort(sNewValue As Long)
On Error Resume Next
'
IRCSocket.LocalPort = sNewValue
'
End Property
'socket events
Private Sub IRCSocket_OnClose()
On Error Resume Next
'
If blClose = True Then Exit Sub
'
Set tmrRaiseDiscon = New CLiteTimer
tmrRaiseDiscon.Interval = 100
tmrRaiseDiscon.Enabled = True
End Sub
Private Sub IRCSocket_OnConnect()
On Error Resume Next
'
RaiseEvent IRCSocketConnect
End Sub
Private Sub IRCSocket_OnDataArrival(ByVal bytesTotal As Long)
On Error Resume Next
Dim sData As String
'
IRCSocket.GetData sData
'
ParseRAWSocketData sData
End Sub
Private Sub IRCSocket_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)