#1
  1. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154

    Receiving 1024 bytes


    Can anyone show me the correct code for this,
    Code:
    Dim strTmp As String
    Winsock2.GetData strTmp, vbString
    Battlenet.ParseData strTmp
    I just got help on another forums and got the proper code for Parse and ParseData. Now when I try the above code (obviously, written in Python) I don;t get anywhere. I don't have any errors or have anything happen. Here's the code I'm using.
    Code:
    def dataArrival():
        strTmp = s.recv(1024)
        s.recv(1024)
        parse_data(strTmp )
    I just need to atleast know what strTmp should equal. Apparently making it receive 1024 bytes does nothing. Thanks.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    624
    Rep Power
    34
    I just need to atleast know what strTmp should equal.
    ...

    It should equal whatever was read from the socket by that particular recv() call. Which would depend on the Battlenet protocol, the user input/output from the start of the program, and where in the protocol the program is when the call is made.

    It's exact contents are pretty much completely unpredictable to a person.

    Apparently making it receive 1024 bytes does nothing.
    It does - it makes it wait until it receives between 1 and 1024 bytes from the socket, then return them.

IMN logo majestic logo threadwatch logo seochat tools logo