xale / iTetrinet

TetriNET Client Developed for Mac OS X 10.5 Leopard
21 stars 9 forks source link

TSpec Support #86

Open xale opened 14 years ago

xale commented 14 years ago

Adding support for the TetriNET spectator protocol, TSpec, in a future release shouldn't be too difficult.

xale commented 14 years ago

That is, providing I can find some documentation...

(Or Wireshark GTetrinet... ew.)

ebourg commented 14 years ago

You might want to look at the TspecProtocol and TSpecListener classes in Jetrix. The protocol is similar to Tetrinet, with some additional commands and a different handshake.

The TSpec port is 31458. There are 2 possible handshakes, either the same as Tetrinet (tetrix mode), or a nickname followed by an encoded password (tserv mode). Jetrix doesn't read and check the password, it's always open to spectators.

Depending on the mode activated the messages are different.

Tetrix mode:

TServ mode:

Messages shared by both modes:

xale commented 14 years ago

Thank you! That will make a great reference.

ebourg commented 14 years ago

I haven't figured the encoding used for the password in the tserv mode, I guess it's similar to the one used for the tetrinet handshake. I suggest you implement the tetrix mode since it seems to be the most widely supported. It works on the servers derived from tetrinetx, Tetridome, JTS and Jetrix. Servers based on PTNS do not support TSpec.