https://github.com/georgiakt/server-client-using-rpc-and-sockets
Server-Client computational project made in C with the use of RPC and Sockets.
https://github.com/georgiakt/server-client-using-rpc-and-sockets
c client-server command-line makefile rpc sockets wsl2
Last synced: about 1 year ago
JSON representation
Server-Client computational project made in C with the use of RPC and Sockets.
- Host: GitHub
- URL: https://github.com/georgiakt/server-client-using-rpc-and-sockets
- Owner: GeorgiaKt
- License: mit
- Created: 2023-08-06T17:20:53.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-08T23:03:46.000Z (almost 3 years ago)
- Last Synced: 2025-04-10T22:57:51.272Z (about 1 year ago)
- Topics: c, client-server, command-line, makefile, rpc, sockets, wsl2
- Language: C
- Homepage:
- Size: 77.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Server-Client using RPC and Sockets
## Description
In this project there is a Server-Client communication, combining RPC and Sockets in C. Starting with the socket communication, there is a client that is responsible for communicating with the user, meaning printing menu, reading data and printing back the results calculated and there is also a server. The socket server is, also, a RPC client at the same time. So, when the socket server receives the data sent from the client (socket client), then calls a function responsible for the corresponding calculations. The RPC server is the one that has the functions responsible for calculating the results.
Main data types that are used: vectors X and Y, variable n for the length of both vectors, variable r for a fixed value given.
The Calculations that can be made:
- Inner Product: (X*Y)
- Average Values: Ex, Ey (for each vector)
- Product: r*(X+Y)
## Prerequisites
- RPC installed
- Linux environment or WSL
## How to compile
```
gcc client.c -o client
make
```
## How to run
Run RPC Server:
```
./ask_rpc_server
```
Run RPC Client / Socket Server:
```
./ask_rpc_client localhost
```
Run Socket Client:
```
./client localhost
```
*Each command should be executed in a different terminal.*
Before running make sure you have run `sudo rpcbind`!