Skip to content

aiphae/C-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple multithreaded server in C that accesses some .txt files, reads and outputs them.

server.c : core of the server. Uses sockets to create connection and utilizes POSIX threads to handle multiple 'sessions' concurrently. Enqueues every request to the server and uses mutex and condition variable to properly handle the connections.

queue.c : implements a queue data structure with enqueue() and dequeue() functions.

client.c : represents a client application that connects to the server and requests a random .txt file.

clients.bash : generates a bunch of client connections.

Usage:

First terminal: ./server

Second terminal: ./clients.bash

About

A simple multithreaded server in C.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published