This is a C-based networking application that simulates a basic Spotify-like server-client system, along with a web browser-like interface for song search and retrieval. It demonstrates concepts like socket programming, hash tables, linked lists, and error handling in C.
- Client-server architecture using sockets
- Custom browser interface to interact with the server
- Song search functionality via linked list and hash table
- Server-side error handling
- CSV-based song data storage (
spotify_songs.csv)
demo_server.c/demo_server_err.c- Example servers showcasing socket usage with and without error handlingsclient.c- Socket client implementationsserver.c- Custom Spotify song server using socket communication
sbrowser.c- Command-line interface simulating browser functionality to connect with the song serversbrowser.h- Header file for the browser module
htable.c/htable.h- Hash table implementation for song indexingslist.c/slist.h- Singly linked list implementation for managing song entriessnode.c/snode.h- Node definition for linked list elements
spotify.c/spotify.h- Core logic for handling Spotify song metadataspotify_songs.csv- Sample song dataset used for indexing and searching
Makefile- Automates compilation of the server, client, and browser components
makeStart the main song server, which reads song data from spotify_songs.csv and listens for client connections.
./sserverLaunch the command-line browser interface to connect to the Spotify song server. This client allows you to search for songs and retrieve information from the server.
./sbrowsermake cleanTo run this project, you will need:
- A C compiler (e.g.,
gcc) - A Unix-like operating system (Linux or macOS recommended)
- A terminal or shell environment to compile and run the programs
- Basic understanding of socket programming (helpful for customization)
No external libraries are required—this project is built entirely with standard C and POSIX sockets.