I am a PublicHubList owner. My list is based on other lists' data, and I noticed many hubowners are faking the usercount on the main Hublists like Dreamland.
I wrote a topic about "spidering" hubs. Now I have begun to code a VB.NET program that connects to hubs in PublicList, counts the users (and maybe the sharesize too) and leaves the hub.
I've managed to connect and retrieve hub name and description. Now I need to get user list.
The program logs into the hub with fake sharesize and tag correctly. But, when managing sockets, I need to get the HUGE stream of the userlist (I am testing it on a 1000 people hub), the socket stream is cut. Also, when placing all socket data into a logfile, there are many and many white spaces.
This is the code of my ReadSocket function
Code: Select all
Private Function LeggiSocket(ByRef Hubsock As TcpClient) As String
While Not Hubsock.GetStream.DataAvailable()
Application.DoEvents()
End While
If Hubsock.GetStream.DataAvailable() Then
Dim InBuffer(Hubsock.ReceiveBufferSize) As Byte
Hubsock.GetStream().Read(InBuffer, 0, Hubsock.ReceiveBufferSize)
Return System.Text.Encoding.Default.GetString(InBuffer).Trim()
Else
Return "No dati"
Exit Function
End If
End Function
Any help? How does DC++ (in C++ language of course) get the userlist via socket stream? I'm new to C++, but if anybody tell me the exact position of the code with some explanation I can simply port the code to my application.
Thank you for your help.