Results 1 to 8 of 8

Thread: Winsock connect serverlist problem "SendData"(solved)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2004
    Location
    sweden
    Posts
    176

    Resolved Winsock connect serverlist problem "SendData"(solved)

    Hi,
    Im trying to connect a game serverlist using winsock, and this is what im sending from the original program:
    Code:
    ........a.A...A...AX.0...jmno7hdv
    1F 00 01 02 00 E4 02 9C 61 BF 41 86 EA B9 41 A8 9C 9C 41 58 1D 30 00 08 00 6A 6D 6E 6F 37 68 64 76
    When i send the exact string using winsock i wont get a reply.
    Is there a table or something that will explain the HEX-values such as vbcrlf = ".." or "0D 0A", vbnullstring = "00" ect..

    EDIT: wrong forums
    thanks,
    naitsabes
    Last edited by naitsabes85; Apr 4th, 2005 at 10:41 AM.

  2. #2
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Winsock connect serverlist problem "SendData"

    Are you using the UDP protocol?

    And what type of game server are you querying? I hope you're not sending the data as

    Socket.SendData "1F 00 01" etc..

    Those are hex values representing the actual characters being sent. To convert those hex values into normal characters, you would need to use the Chr$() function, like:

    Socket.SendData Chr$("&H1F") & Chr$("&H00") etc...

    Just use the Chr$() function, add quotes and a "&H" to the beginning to convert it from hex to ASCII.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2004
    Location
    sweden
    Posts
    176

    Re: Winsock connect serverlist problem "SendData"

    It uses Tpc protocol, i tried to send the string as i got it "........a.A...A...AX.0...jmno7hdv", but some dots might be important chracters like vbback or things like that.
    The connect string always looks the same, never changes,
    naitsabes

  4. #4
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Winsock connect serverlist problem "SendData"

    The dots are usually chr$(0) so try replacing them with that.

  5. #5
    New Member
    Join Date
    Apr 2005
    Posts
    2

    Re: Winsock connect serverlist problem "SendData"

    Do not treat the incoming data as a string, it is not a string. I'd be willing to help you if you mentioned which game it was.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Apr 2004
    Location
    sweden
    Posts
    176

    Re: Winsock connect serverlist problem "SendData"

    The problem here is that it sends all dots as HEX "2E", else this would work ,
    I got the hex values, but chr$("&h0") or chr$(0) = nothing...
    naitsabes

  7. #7
    Addicted Member Luke K's Avatar
    Join Date
    Jun 2004
    Location
    Perth, Australia
    Posts
    183

    Re: Winsock connect serverlist problem "SendData"

    It would be helpful if you told us why you are sending that particular data, it might not be a problem with your program, it may just be the server isnt designed to respond to that kind of data
    Artificial Intelligence At War! - The best game of its genre
    Program your own robot and watch it fight in 3d!
    Droidarena 3

    If I have been useful, please Rate My Post

    Support FireFox -
    Microsoft Visual Studio .NET Professional 2003
    Microsoft Visual Studio 6, Enterprise Edition
    Microsoft Windows XP Professional, Service Pack 2

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Apr 2004
    Location
    sweden
    Posts
    176

    Re: Winsock connect serverlist problem "SendData"(solved)

    Boy's and girl's i solved it thanks to DigiRev and the chr$ =),
    naitsabes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width