This project implements a simple textual protocol server that provides information about Pink Floyd albums and songs.
client.py
: Contains the client-side implementation of the Pink Floyd protocol.server.py
: Contains the server-side implementation of the Pink Floyd protocol.Pink_Floyd_DB.txt
: A text file database containing information about Pink Floyd albums and songs.
- Start the server by running
server.py
. - Start the client by running
client.py
.
The client provides the following options:
- Get the list of all Pink Floyd albums.
- Get the list of all Pink Floyd songs in a specific album.
- Get the length of a specific Pink Floyd song.
- Get the lyrics of a specific Pink Floyd song.
- In which albums does the song appear?
- Get all songs with a specific word in the title.
- Get all songs with a specific word in the lyrics.
- EXIT
The Pink Floyd protocol message format is as follows:
TYPE:<3-bit binary number>|DATA:<message data>
The server can respond with the following error messages:
INVALID_OPTION_ERROR
: The client sent an invalid option.SONG_NOT_FOUND_ERROR
: The requested song was not found.NO_SONGS_FOUND_ERROR
: No songs were found for the given criteria.NO_ALBUMS_FOUND_ERROR
: No albums were found for the given criteria.
- Python 3
- tkinter
- socket
- select
- errno