![]() |
PokerUnicorn
|
PokerUnicorn Server is a poker server software written in C for the PokerUnicorn Infrastructure project.
Play the demo on web (Uses Monero Stagenet. No real money.)
This is a gambling service software and it is not allowed to use this software in countries where gambling is illegal.
This software is an open source project and it is not allowed to use this software for commercial purposes. (Read the license.)
This poker server and its client are not using any real money or real blockchain. It is using Monero Stagenet which is a testing purposed blockchain network and it doesn't have any real value.
If you are interested in using this software for commercial purposes, you can contact me for a special license and consulting.
If my technology is useful for your commercial purposes or you just love it, donate me some cute amount of USDT/USDC, Bitcoin, or Monero; developing and maintaining this software is not easy and it takes a lot of time and effort.
Currency | Address |
---|---|
BTC | bc1qhvlc762kwuzeawedl9a8z0duhs8449nwwc35e2 |
ETH / USDT / USDC | 0x1D99B2a2D85C34d478dD8519792e82B18f861974 |
XMR | 8A8HWvGp8d3Qf8Qn1ei97RXPJiQYodvBxLSaPbnLEKAZ2pjnAbmNLn59HNPKirrAmKTfNEfjbobdi33zV1CwDQ7qRLxiZvR |
You can donate me on Patreon too:
You can donate me on GitHub Sponsors too:
Here is a short explanation of how the server works:
pkrsrv_lobby_t
) is the main module that manages the game sessions and clients and it works with an event loop. (pkrsrv_event_loop_t* pkrsrv_lobby_t*eventloop
)The repository has submodules. You need to clone the repository with --recursive
flag.
To enable using GDBFrontend and directly developing on Linux which is the server is supposed to work on, we have a Docker setup.
The Docker composition has following things:
To start everything, just do this:
PokerServer/host
. (You can do that on host machine, it is mounted to container.).env
file in PokerServer
folder and specify SSL certificate and key files:You can set bind address with the environmant variable PKRSRV_GDBFRONTEND_BIND_ADDRESS
in .env
file.
Note Server folder is placed at
/root/PokerServer
in container. Better you specify absolute paths for environment variables.
When the container is up, GDBFrontend is reachable at:
Kind / Label | Feature |
---|---|
Serializable | Already serializable representations |
To-serialize | Will be serialized for something |
Each client has their own threads and the rest of the server is using event loop (pkrsrv_eventloop_t* pkrsrv_lobby_t*eventloop
).
You can contribute to this project by forking this repository and sending pull requests. You can also open issues for bugs and feature requests. Or you can donate me to support the development of this project.
PKRSRV_UTIL_ASSERT(...)
) and have a breakpoint at pkrsrv_util_assert_fail()
.You can read the network protocol documentation from PROTOCOL.md.
Runtime identifier module is pkrsrv_uniqid
.
An identifer is an unsigned 64 bit scalar of the type pkrsrv_uniqid_uuid_t
which is increased by +1
for each generation.
Sessions are HEAP objects of pkrsrv_session_t*
.
lobby->sessions
of pkrsrv_lobby_session_t*
trie.c
/ pkrsrv_trie_...__index
)pkrsrv_lobby_client_t
) points to pkrsrv_lobby_session_t*
through pkrsrv_lobby_client_session_t::session
.Clients are HEAP objects of pkrsrv_server_client_t*
.
server->clients
of pkrsrv_server_client_t*
trie.c
/ pkrsrv_trie_...__index
)Lobby clients are HEAP objects of pkrsrv_lobby_client_t*
.
pkrsrv_server_client_t
) points to pkrsrv_lobby_client_t*
through pkrsrv_server_client_t::owner
.pkrsrv_lobby_session_t
) of pkrsrv_lobby_session_client_t*
GNU General Public License v3
Copyright (C) 2023, Oğuzhan Eroğlu meowi.nosp@m.ngca.nosp@m.te@gm.nosp@m.ail..nosp@m.com (https://meowingcat.io)
GNU General Public License v3 (GPL-3)
You may copy, distribute and modify the software as long as you track changes/dates in source files. Any modifications to or software including (via compiler) GPL-licensed code must also be made available under the GPL along with build & install instructions.