johnnyfive
Hi.
I'm starting to build a web application that lists rFactor servers, so one can join the server without opening the in game server browser. To do this, I need to know how can I parse the response sent by the server at match.rfactor.net:39001.
So far I figured this:
me --> match.rfactor.net:
<FCU 1.25>
match.rfactor.net --> me (hexdump):
00000000 3c 43 20 31 30 30 30 20 32 36 39 30 30 36 3e 00 <C 1000 269006>.
00000010 3c 00 36 00 32 00 33 00 3e 00 72 00 46 00 61 00 <.6.2.3. >.r.F.a.
00000020 63 00 74 00 6f 00 72 00 00 00 01 00 00 00 00 00 c.t.o.r. ........
00000030 6d 00 a8 00 6f 00 97 00 68 00 02 00 e7 00 04 00 m...o... h.......
00000040 e8 00 03 00 5d 00 86 00 f9 00 85 00 46 00 31 00 ....]... ....F.1.
00000050 52 00 46 00 54 00 5f 00 32 00 30 00 31 00 30 00 R.F.T._. 2.0.1.0.
00000060 5f 00 4d 00 50 00 00 00 72 00 66 00 6d 00 00 00 _.M.P... r.f.m...
00000070 45 00 9e 00 56 00 46 00 41 00 43 00 54 00 4f 00 E...V.F. A.C.T.O.
00000080 52 00 20 00 49 00 54 00 41 00 4c 00 49 00 41 00 R. .I.T. A.L.I.A.
00000090 20 01 24 00 31 00 31 00 00 00 93 00 7c 00 48 00 .$.1.1. ....|.H.
000000A0 75 00 fa 00 00 00 d0 00 60 00 42 00 72 00 69 00 u....... `.B.r.i.
000000B0 74 00 69 00 73 00 68 00 20 00 47 00 72 00 61 00 t.i.s.h. .G.r.a.
000000C0 6e 00 64 00 20 00 50 01 4e 00 78 00 20 00 77 00 n.d. .P. N.x. .w.
.................
- 1st part: <C 1000 269006>
This looks like the header of the response: 1000 servers returned, response length is 269006 bytes.
- 2nd part: <.6.2.3. >
This part looks fundamental, but I still havent figured what it means.
- IP/Port:
I've found the IP address and port of the first server.
ip: 6d 00 a8 00 6f 00 97 00
- Server name and other strings:
For example, I still haven't figured why "2011" is encoded as
0x01 0x24 0x00 0x31 0x00 0x31 0x00
and not
0x32 0x00 0x30 0x00 0x31 0x00 0x31 0x00
(Example: See the first result in hexdump: V.F. A.C.T.O.R. .I.T.A.L.I.A. .$.1.1.)
Has anyone figured how to parse the response from matchmaker?
Cheers.
I'm starting to build a web application that lists rFactor servers, so one can join the server without opening the in game server browser. To do this, I need to know how can I parse the response sent by the server at match.rfactor.net:39001.
So far I figured this:
me --> match.rfactor.net:
<FCU 1.25>
match.rfactor.net --> me (hexdump):
00000000 3c 43 20 31 30 30 30 20 32 36 39 30 30 36 3e 00 <C 1000 269006>.
00000010 3c 00 36 00 32 00 33 00 3e 00 72 00 46 00 61 00 <.6.2.3. >.r.F.a.
00000020 63 00 74 00 6f 00 72 00 00 00 01 00 00 00 00 00 c.t.o.r. ........
00000030 6d 00 a8 00 6f 00 97 00 68 00 02 00 e7 00 04 00 m...o... h.......
00000040 e8 00 03 00 5d 00 86 00 f9 00 85 00 46 00 31 00 ....]... ....F.1.
00000050 52 00 46 00 54 00 5f 00 32 00 30 00 31 00 30 00 R.F.T._. 2.0.1.0.
00000060 5f 00 4d 00 50 00 00 00 72 00 66 00 6d 00 00 00 _.M.P... r.f.m...
00000070 45 00 9e 00 56 00 46 00 41 00 43 00 54 00 4f 00 E...V.F. A.C.T.O.
00000080 52 00 20 00 49 00 54 00 41 00 4c 00 49 00 41 00 R. .I.T. A.L.I.A.
00000090 20 01 24 00 31 00 31 00 00 00 93 00 7c 00 48 00 .$.1.1. ....|.H.
000000A0 75 00 fa 00 00 00 d0 00 60 00 42 00 72 00 69 00 u....... `.B.r.i.
000000B0 74 00 69 00 73 00 68 00 20 00 47 00 72 00 61 00 t.i.s.h. .G.r.a.
000000C0 6e 00 64 00 20 00 50 01 4e 00 78 00 20 00 77 00 n.d. .P. N.x. .w.
.................
- 1st part: <C 1000 269006>
This looks like the header of the response: 1000 servers returned, response length is 269006 bytes.
- 2nd part: <.6.2.3. >
This part looks fundamental, but I still havent figured what it means.
- IP/Port:
I've found the IP address and port of the first server.
ip: 6d 00 a8 00 6f 00 97 00
- Server name and other strings:
For example, I still haven't figured why "2011" is encoded as
0x01 0x24 0x00 0x31 0x00 0x31 0x00
and not
0x32 0x00 0x30 0x00 0x31 0x00 0x31 0x00
(Example: See the first result in hexdump: V.F. A.C.T.O.R. .I.T.A.L.I.A. .$.1.1.)
Has anyone figured how to parse the response from matchmaker?
Cheers.
Last edited: