Author | Message | Time |
---|---|---|
laurion | I am connecting to my socks server fine, but I am receiving my packets from bnet in clumps! [code] 3 192.168.2.62:1732 200.117.129.160:1080 59 Send 0000 01 FF 50 3A 00 00 00 00 00 36 38 58 49 56 44 32 ..P:.....68XIVD2 0010 44 0B 00 00 00 00 00 00 00 00 00 00 00 80 04 00 D............... 0020 00 33 10 00 00 33 10 00 00 55 53 41 00 55 6E 69 .3...3...USA.Uni 0030 74 65 64 20 53 74 61 74 65 73 00 ted States. 4 200.117.129.160:1080 192.168.2.62:1732 106 Recv 0000 FF 25 08 00 58 9D C8 81 FF 50 62 00 00 00 00 00 .%..X....Pb..... 0010 DB 8D 86 74 7E 72 23 00 00 AC 41 43 25 0B C5 01 ...t~r#...AC%... 0020 49 58 38 36 76 65 72 31 2E 6D 70 71 00 41 3D 39 IX86ver1.mpq.A=9 0030 39 32 30 33 37 36 38 38 20 42 3D 35 33 39 38 37 92037688 B=53987 0040 30 30 30 20 43 3D 35 39 33 38 37 33 35 31 38 20 000 C=593873518 0050 34 20 41 3D 41 2D 53 20 42 3D 42 2B 43 20 43 3D 4 A=A-S B=B+C C= 0060 43 2B 41 20 41 3D 41 5E 42 00 C+A A=A^B. [/code] Is there anything I can do to fix this? I cannot parse packets when they are received 2 at a time :-\ btw: 200.117.129.160:1080 is a proxy, and 192.168.2.62 is my router IP. | December 21, 2005, 9:11 PM |
Myndfyr | Take a look at this topic ( <3 search! ) | December 21, 2005, 9:52 PM |
laurion | hmm..no luck..am i grabbing data right? [code] Private Sub sckBnet_DataArrival(ByVal bytesTotal As Long) Dim strTemp$ sckBnet.GetData strTemp, vbString Select Case Mid(strTemp, 2, 1) Case Chr(&H5A) AddText vbGreen, "SOCKS Request Granted, beginning battle.net connection." sckBnet.SendData Chr(1) Packet50 Case Else Parse(strTemp) End Select End Sub [/code] Also, my packet 50: [code] Public Sub Packet50() Clear InsertDWORD &H0 InsertNonNTString "68XIVD2D" InsertDWORD &HB InsertDWORD &H0 InsertDWORD &H0 InsertDWORD &H480 InsertDWORD &H1033 InsertDWORD &H1033 InsertNTString "USA" InsertNTString "United States" SendPacket &H50 End Sub --sendpacket-- Public Function SendPacket(PacketID As Byte) If sckBnet.State <> 7 Then Exit Function Me.sckBnet.SendData Chr(&HFF) & Chr(PacketID) & MakeWORD(Len(buffer) + 4) & buffer Clear End Function [/code] Does everything look right? because now, I get disconnected after sending 0x50 and I receive nothing from bnet.. :-\ | December 22, 2005, 12:43 AM |
Kp | [quote author=Tazo link=topic=13612.msg138774#msg138774 date=1135199494] I am connecting to my socks server fine, but I am receiving my packets from bnet in clumps! Is there anything I can do to fix this? I cannot parse packets when they are received 2 at a time :-\[/quote] You're doomed. It's highly likely that TCP will do the same thing to you whether you use a SOCKS proxy or not. Also, why're you using SOCKS4? SOCKS5 has been out for ages... [quote author=Tazo link=topic=13612.msg138803#msg138803 date=1135212200]Does everything look right? because now, I get disconnected after sending 0x50 and I receive nothing from bnet.. :-\[/quote] No, there's a lot of VB code there. That's never a good sign. Being disconnected also indicates a problem. :) As is typically advised when people complain that they're falling offline, I'll suggest to you that you post what's being sent and received. It's much easier to analyze that for correctness than to try to determine whether your code is constructing the message correctly, particularly when you don't post all of your code. | December 22, 2005, 2:55 AM |
LoRd | Packet headers exist for a reason. | December 22, 2005, 3:39 AM |
Myndfyr | [quote author=Tazo link=topic=13612.msg138819#msg138819 date=1135221110] I got to connecting fine, however packets are still clumping up and I am still yet to find a solution.. [/quote] OH MY GOD. Did you not read what I suggested? Let me quote from this thread[quote][/quote] that I cited [url=https://davnit.net/bnet/vL/index.php?topic=13612.msg138778#msg138778]in this post: [quote author=MyndFyre link=topic=13325.msg135046#msg135046 date=1132695362] Don't count on it always being there. The recv (or if you're using VB, DataReceived) function should specify how long your packet was (how much data was received). Always check that against the header-specified length to see whether you need to extract more data from the packet. [/quote] Let me re-emphasize: [quote author=MyndFyre link=topic=13325.msg135046#msg135046 date=1132695362] Don't count on it always being there. The recv (or if you're using VB, DataReceived) function should specify how long your packet was (how much data was received). Always check that against the header-specified length to see whether you need to extract more data from the packet. [/quote] It is able and EASY to split packets. | December 22, 2005, 4:08 AM |
laurion | i just sorta skimmed through the thread, thnks Mynd, I've had about 5 hrs of sleep ::) thanks again | December 22, 2005, 4:22 AM |