-
Notifications
You must be signed in to change notification settings - Fork 8
Program Architecture
The goal of this part is to establish a clear separation of each part of the program, before any development is started.
The teamspeak protocol re-implements some features over udp :
- Acknowledges
- Packet order
- Keepalives
The network part should be able to manage this :
- When a packet is sent, wait for an ack.
- If we do not receive it, sent if again with the version field increased (every ~100ms).
- Manage packet checksums (create and verify).
- If we receive a packet, send an acknowledge.
- Send an acknowledge for each different versions of the same packet.
- If we receive a packet with version 7, then with version 3, only send an ack for version 7
An idea is to have each packet type in a .c/.h file, put in a directory depending if they are sent by the client or the server.
Each packet should have an encode and a decode function, that take care of endianness/structure padding.
- All packets need a valid public and private ID.
- Command packets have a checksum (f0)
- Command packets have an order (do not process packet 23 if you have not processed/received packet 22) (f0)
- Audio packets have order but it is not used (f3)
- Command packets have a version, used in acknowledges. (f0)
A special care has to be taken for players private ID generation.
Maybe openssl’s pseudo random number generator could guarantee nobody can discover or predict a player’s private ID.
A database should be used to store information (accounts, channels, etc).
- SQLite
- MySql
- Use an abstraction layer (currently libdbi)
To administer the server, a web administration module should be created.
- Webmin/… ?
- Independent (php, python, perl, ruby?) ?
Audio playing/recording can be managed in a cross platform way with the portaudio library.
The audio part is strongly linked to the Encoding/Decoding part.
Codecs used in Teamspeak all have an open source implementation (speex/celp/gsm).
There needs to be an abstraction layer to those.
- QT
- GTK+
- Cocoa
- WxWidgets
-
Tkjust kidding