Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/georgiifirsov/asyncnotifications
It is an example of client-server application system, used to show Microsoft Asynchronous RPC library in action. This code is written in C and C++14 for Windows using WinAPI.
https://github.com/georgiifirsov/asyncnotifications
asynchronous-programming client-server concurrency concurrent-programming cplusplus cplusplus-14 cpp14 microsoft microsoft-rpc remote-procedure-call rpc
Last synced: 3 days ago
JSON representation
It is an example of client-server application system, used to show Microsoft Asynchronous RPC library in action. This code is written in C and C++14 for Windows using WinAPI.
- Host: GitHub
- URL: https://github.com/georgiifirsov/asyncnotifications
- Owner: GeorgiiFirsov
- License: gpl-3.0
- Created: 2019-12-14T14:09:43.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-14T19:04:33.000Z (over 4 years ago)
- Last Synced: 2024-11-06T03:09:26.364Z (about 2 months ago)
- Topics: asynchronous-programming, client-server, concurrency, concurrent-programming, cplusplus, cplusplus-14, cpp14, microsoft, microsoft-rpc, remote-procedure-call, rpc
- Language: C++
- Homepage: https://georgyfirsov.github.io/AsyncNotifications/
- Size: 230 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AsyncNotifications
> Work in progress
It is an example of Client-Server application model, that demonstrates
Microsoft AsyncRPC technology in action.This project contains two applications:
- Server app
- Client app### Server application
After this program started it is ready to receive subscription requests from many
clients. It receives a synchronous client RPC-call, which is an request for subscription,
register it inside itself and sends a reply for success of failure of registration. After
this action it receives an asynchronous call and leaves it pending until a specified
event happened (see more about events in [Events](#Events) section). In case of an event
server invokes `RpcAsyncCompleteCall` to send some information about it to subscribed client.
If all client's subscriptions are cancelled asyncronous call will be aborted with `ERROR_CANCELLED`
status. In case of cancellation of a subscription server decreases an internal binded with
concrete client counter (not to cancel asynchronous call mistakenly).### Client application
Client will be able to subscribe to any number of distinct events. It'll wait for asyncroous
call result in a separate thread in order to allow concurrent waiting and subscribing.### Events
In order to simplify this application events will be as simple as possible:
After minimal preparations server will wait for input with keyboard. Subscription will be a letter
which should be the first letter of servers' input string. Server will be able to handle any
number of input strings.### Commands
Client app will have simple rules applied to it's input:
- `quit` will close client in common way with all cleaning procedures
- `exit` will terminate client immediately (by calling `std::terminate`)
- `+[a-zA-Z]` will send a subscription request to server
- `-[a-zA-Z]` will send a cancellation request to server
- any other string will be ignoredServer's commands will be simpler:
- `quit` will close client in common way with all cleaning procedures
- `exit` will terminate client immediately (by calling `ExitProcess`)
- any other string will be assumed as an input### Session example
![Screenshot 1](./Images/Picture-1.png)