Модератор: BV
'## описания каналов связи
Public Enum ChannelID
chn_Connection = 1
chn_DataSwap = 2
chn_Error = 3
chn_Disconnect = 4
End Enum
'## описания FLAP-пакета
Public Type FLAP
flp_CmdStart As Byte '## обычно = 0
flp_Channel As ChannelID '## описан ранее
flp_SeqNumb As Long '## номер запроса (нужно 2 байта от 0 и до 65 тыс.)
flp_DataFldLen As Long '## размер данных (нужно 2 байта от 0 и до 65 тыс.)
flp_Data As String '## сами данные
End Type
Dim Buffer As String
Dim SwapSize As String
Private Sub Command1_Click()
Buffer = ""
net.Close
net.Connect "login.icq.com", 5190
End Sub
Private Sub net_DataArrival(ByVal bytesTotal As Long)
Dim A As String
net.GetData A
Text1 = ""
For i = 1 To Len(A)
Text1 = Text1 & Format(Hex(Asc(Mid(A, i, 1))), "00") & " "
Next i
Caption = Len(A)
net.Close
End Sub
2A 02 FC 2F 00 24
00 01 00 03 00 00 8F C0 C5 6B
00 01
00 02
00 03
00 04
00 06
00 08
00 09
00 0A
00 0B
00 0C
00 13
00 15
00 22
2A 02 14 B2 00 28
00 01 00 17 00 00 00 00 00 00
00 01 00 03
00 13 00 02
00 02 00 01
00 03 00 01
00 15 00 01
00 04 00 01
00 06 00 01
00 09 00 01
00 0A 00 01
00 0B 00 01
Connect to login.icq.com:5190
SERVER SEND: LEN - 10
SERVER SEND: LEN - 301
Autorization complite
<== SNAC 0, 0
<== SNAC 1, 3
> SNAC 1,17
<== SNAC 1, 18
> SNAC 1,6
<== SNAC 1, 13
<== SNAC 1, 7
> SNAC 1,8
> SNAC 13,2
> SNAC 13,5
> SNAC 2,2
> SNAC 3,2
> SNAC 4,4
> SNAC 9,2
<== SNAC 2, 3
<== SNAC 3, 3
<== SNAC 4, 5
<== SNAC 9, 3
> SNAC 13,7
> SNAC 2,4
> SNAC 4,2
> SNAC 1,1E
> SNAC 1,2
End service connection :)
<== SNAC 13, 3
<== SNAC 13, 6
<== SNAC 1, F
<== SNAC B, 2
<== SNAC 3, B
<== SNAC 4, 7 - входящая месага
Function CnvLongToStr(Numb As Long) As String
CnvLongToStr = ""
If Numb = -10 Then Numb = 0
While Numb >= 255
CnvLongToStr = Chr(Numb Mod 256) + CnvLongToStr
Numb = Int(Numb / 256)
Wend
CnvLongToStr = Chr(Numb Mod 256) + CnvLongToStr
End Function
Private Sub Work_DataArrival(ByVal bytesTotal As Long)
...
BufferA = ""
gSEQ = gSEQ + 1 '<<< ТУТ ОШИБКА
End Sub
IF NeedMoreIndex Then sSEQ = sSEQ + 1
gaidar писал(а):ICQ на VB: http://www.localhost.co.nr/
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 0