Skip to content

A multiprocessing client/server framework implement in linux, using shared memory(shmget etc.) and signal(semget etc.).

Notifications You must be signed in to change notification settings

starunvs/client-server-framwork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A simple client/server framwork in linux

A multiprocessing(use fork) client/server framework implementation in linux, using shared memory(shmget etc.) and signal(semget etc.).

Client

Client can send message to server and receive message from server.

Server

Server can receive message from multiple clients, and broadcast the message to all clients.

The main process creates a subprocess for each client through fork, and uses select to accept clients' connection. By this way, the main process is not blocked. Main process also maintains a client list and is responsible for broadcasting the message from each client.

The subprocess receives the client's message and passes the content to the main process by modifying the shared memory. In order to modify the shared memory correctly, signal is used.

About

A multiprocessing client/server framework implement in linux, using shared memory(shmget etc.) and signal(semget etc.).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages