Commit Graph

142 Commits

Author SHA1 Message Date
Tristan B. Velloza Kildaire ad5eed9836 Server (unittests)
- Disabled import of `tristanable.queue` as it failed
2023-11-18 13:16:34 +02:00
Tristan B. Velloza Kildaire c7059f5a91 Connection
- Changed testing username from `tristan` to `bababooey`
- Set username based on the `AUTH_MESSAGE`'s value
- Print out current members of a channel when enumerating them
- Added support for `MEMBERSHIP_LEAVE`
2023-11-18 13:07:30 +02:00
Tristan B. Velloza Kildaire 4b436b21ee Connection
- Fixed handling of `MEMBERSHIP_JOIN` which was not joining but enumerating and generating an enumeration reply
- Added support for joining then and proper support for `MEMBERSHIP_LIST` (enumeration)
2023-11-18 12:30:38 +02:00
Tristan B. Velloza Kildaire c07b2185d5 Connection
- Added future TODO (maybe) for the `handle(TaggedMessage)` function
- Extract the `CommandType` at the top and use that instead of using a function call each time
- Added support for `MEMBERSHIP_JOIN` command type
- Added handling for unknown commands
2023-11-18 11:30:39 +02:00
Tristan B. Velloza Kildaire 111174d8fb Server
- Added `getChannelManager()`
2023-11-17 23:33:03 +02:00
Tristan B. Velloza Kildaire 5983bbb56b Channel
- Implemented `getMembers()`

ChannelManager

- Implemented `membershipList(string channel, ref string[] membersList)`
2023-11-17 23:32:47 +02:00
Tristan B. Velloza Kildaire 822959f324 ChannelManager
- Create a duplicate of channel list returned for safety
- This updates `getChannelNames(ulong offset, ubyte limit)`
2023-11-16 15:59:59 +02:00
Tristan B. Velloza Kildaire 44d9d53d02 ChannelManager
- Moved locking for `getChannelNames(ulong offset, ubyte limit)`
2023-11-16 15:59:14 +02:00
Tristan B. Velloza Kildaire e9fddfc55c ChannelManager
- Added some testing channels

Server

- We now construct a `ChannelManager` on construction
- `getChannelNames(ulong, ubyte)` now uses the `ChannelManager` to enumerate the channels
2023-11-16 14:54:08 +02:00
Tristan B. Velloza Kildaire 938ca897bd ChannelManager
- Fixed upper bound calculation when we overshot the length
2023-11-16 14:52:10 +02:00
Tristan B. Velloza Kildaire 3d813ee197 ChannelManager
- Fixed offset, it must be `<` and NOT `<=` as that would include the length of the array
2023-11-16 14:50:44 +02:00
Tristan B. Velloza Kildaire 9ec3020ee2 Channel
- Added a `Mutex` which is initialized on struct construction
- Added methods `hasMember(string username)`, `removeMember(string username)` and `addMember(string username)`

ChannelManager

- Use `addMember(string)` and `removeMember(string)` for `membershipJoin(string, string)` and `membershipLeave` respectively
2023-11-16 14:46:22 +02:00
Tristan B. Velloza Kildaire df517090a0 Channelmanager
- Added a logger
- Implemented `getChannelNames(ulong offset, ubyte limit)`
- Implemented `membershipLeave(string channel, string username)`
2023-11-16 08:38:46 +02:00
Tristan B. Velloza Kildaire 6a1e7bce72 Channelmanager
- Implemented the ability to join a channel
- This was added in the method `membershipJoin(string channel, string username)`
2023-11-15 23:58:07 +02:00
Tristan B. Velloza Kildaire 5fbe43bcea Channelmanager
- Calling `channelCreate(string channel)` now will only add a channel if it did not exist already
2023-11-15 23:32:28 +02:00
Tristan B. Velloza Kildaire 3859b75047 ChannelManager
- Added initial channel management code
2023-11-15 23:24:08 +02:00
Tristan B. Velloza Kildaire cb60e76937 Connection
- `handle(TaggedMessage)` now returns a `TaggedMessage`
- Only send a response if `handle(...)` returns a non-`null` entity
2023-11-15 22:30:56 +02:00
Tristan B. Velloza Kildaire d15645263f Connection
- Added channel enumeration support
2023-11-10 15:26:15 +02:00
Tristan B. Velloza Kildaire 355f89e83d Server
- Added `getChanelNames(ulong, ubyte)`
2023-11-10 13:40:43 +02:00
Tristan B. Velloza Kildaire d415a071c2 Connection
- Added proper handling of responses by setting the correct reply types, commands and so forth
- Re-use the tagged message, update payload and send response
2023-11-10 12:57:36 +02:00
Tristan B. Velloza Kildaire c917a33eb6 Dub
- Use at least version `0.2.2` for `dante`
- Use at least version `0.1.11` for `davinci`
2023-11-10 12:50:13 +02:00
Tristan B. Velloza Kildaire db1d0c2c2a Connection
- Added handling for `AUTH_COMMAND`

Server

- Added stub `attemptAuth(string, string)` method
2023-11-10 00:14:35 +02:00
Tristan B. Velloza Kildaire 322057e8e1 Dub
- Use `~master`
2023-11-09 23:03:18 +02:00
Tristan B. Velloza Kildaire 753924c631 Revert "Dub"
This reverts commit 32fc2915d2.
2023-11-09 21:31:43 +02:00
Tristan B. Velloza Kildaire 32fc2915d2 Dub
- Use `~master`
2023-11-09 21:23:17 +02:00
Tristan B. Velloza Kildaire 13b727fe80 Connection
- Fxed type

Dub

- Upgraded `davinci` and `dante`
2023-10-03 17:27:57 +02:00
Tristan B. Velloza Kildaire b8d739f4d3 Connection
- Removed already-completed TODO
- Added documentation for the `handle(TaggedMessage)`
2023-10-02 20:11:09 +02:00
Tristan B. Velloza Kildaire a608b685ff Connection
- When receiving a `NOP_COMMAND` echo it back
2023-10-01 22:41:43 +02:00
Tristan B. Velloza Kildaire 36a76e3a5d Connection
- Added TODO noting we need to wait on ANY QUEUE
2023-10-01 22:33:24 +02:00
Tristan B. Velloza Kildaire 17ccf9a4db Daemon
- When running (for now) listen on `/tmp/renaissance.sock`
2023-10-01 22:23:50 +02:00
Tristan B. Velloza Kildaire 33b2fe3fbd Server
- Made lekker
2023-10-01 22:23:13 +02:00
Tristan B. Velloza Kildaire da67dc3902 Dub
- Adjusted versions required
2023-10-01 21:27:27 +02:00
Tristan B. Velloza Kildaire 26de09c9e0 Connection
- Print out the `toString()` of the `Command` object
2023-05-06 13:45:08 +02:00
Tristan B. Velloza Kildaire a89fc1c7ef Server (unit tests)
- Create a new `DanteClient` to connect to the `Server` instance and send two `NopRequest`s
2023-05-06 13:38:54 +02:00
Tristan B. Velloza Kildaire 968604e0c8 - Working on `handle(TaggedMessage)`, now decodes using davinci 2023-05-06 13:38:26 +02:00
Tristan B. Velloza Kildaire 62e3ab8acd - Upgraded dependencies 2023-05-06 13:38:12 +02:00
Tristan B. Velloza Kildaire 493ff2fe1f Unit tests
- Disabled self-coded connection tests in favor of using a `DanteClient` to test
2023-05-04 15:00:59 +02:00
Tristan B. Velloza Kildaire 3e6b648347 - Upgraded `dante` to version `0.1.1` 2023-05-04 15:00:36 +02:00
Tristan B. Velloza Kildaire ae364c4c63 Server
- Comment added
2023-05-04 14:45:42 +02:00
Tristan B. Velloza Kildaire 89c7379fbb - Upgraded `davinci` from version `0.0.2 to `0.0.3`
- Added `dante` as a dependency with version `0.0.2`
2023-05-03 14:17:33 +02:00
Tristan B. Velloza Kildaire 5062e4fcb7 Logging
- Moved logging global data static init to `renaissance.logging` module

Daemon

- Removed logging code from here

Connection

- Fixed logging import

Stream

- Fixed logging import

Server

- Fixed logging import
2023-05-03 14:16:48 +02:00
Tristan B. Velloza Kildaire 07a3ddfe98 StreamListener
- Fixed a segmentation fault that would occur due to the `bindAddr` field not being set during construction as it should be; this is now fixed
- Also fixed another bug whereby we were starting the `Connection` thread within `connectionLoop()` but the `Connection.newConnection()` would call it already for us, thus creating two thread running decoder code
- `startListener()` now sets the state to running
2023-05-01 20:46:07 +02:00
Tristan B. Velloza Kildaire 63bbe906cb Modules
- Added module `modules`
2023-05-01 20:33:07 +02:00
Tristan B. Velloza Kildaire 55ed0d8140 Server
- Calling  `start()` will now in-turn call `startListeners()`, thus starting all attached listeners
2023-05-01 19:33:21 +02:00
Tristan B. Velloza Kildaire bfcaee59be Server
- Implemented `startListeners()` which starts all attached listeners
2023-05-01 19:32:18 +02:00
Tristan B. Velloza Kildaire c83ee771c0 Server
- Documented some things to take care of in the future with regards to the `stop()` method and how `Connection` should behave upon failing an `addConnection()` call
- `stop()` now calls `stopListeners()` in order to stop any further connections from coming in
2023-05-01 19:26:49 +02:00
Tristan B. Velloza Kildaire 13f8a33e0b Daemon
- Start the server

Connection

- Added a TODO

Stream

- Added a TODO

Package (`listeners`)

- Publically import the `StreamListener` listener

Server

- Added a field `isRunning` which is set to `true` when `start()` is called and `false` when `stop()` is called
- Added a private method, `stopListeners()`, which locksd the listener queue, then proceeds to call `stopListener()` on each `Listener` object in the queue, then ends by unlocking the listener queue lock
2023-05-01 19:22:59 +02:00
Tristan B. Velloza Kildaire bc3725e6b0 Daemon
- Disabled config code for now in preference to manually creating a `Server` instance and a `Listener` instance to go along with it
2023-05-01 16:42:05 +02:00
Tristan B. Velloza Kildaire f7c236b848 Server
- Fixed bug inm `Server` whereby if a `Listener` was attempted to be added via `addListener(Listener)` then it would throw an exception; the condition needed to be negated

Listener

- Upon super-construction running, call `server.addListener(this)` to add ourselves as a listener to the associated server
2023-05-01 16:41:32 +02:00
Tristan B. Velloza Kildaire 1a6c02b701 Config files
- Added `renaissance.json` config file
2023-05-01 16:11:45 +02:00