Tristan B. Velloza Kildaire
f8b5dab03a
Merge branch 'master' into feature/queueing
2023-11-26 14:16:39 +02:00
Tristan B. Velloza Kildaire
313ff9b557
Connection
...
- Removed now-completed TODO
- Use a boolean to supress unreachable errors
- Added a TODO to implement the above
- On exiting loop call the `Server`'s `onConnectionDisconnect(Connection)` method
2023-11-26 14:15:59 +02:00
Tristan B. Velloza Kildaire
416d583658
Connection
...
- Added TODO (backported)
2023-11-26 14:13:12 +02:00
Tristan B. Velloza Kildaire
d44cc03437
Server
...
- Added initial implementation of `onConnectionDisconnect(Connection connection)`
2023-11-26 14:12:04 +02:00
Tristan B. Velloza Kildaire
bbcf9b1413
LinkType
...
- Added first member (so `LinkType.init`) `UNSET`
Connection
- Added `linkType` and getter
2023-11-26 14:09:25 +02:00
Tristan B. Velloza Kildaire
8df9c09f43
LinkType
...
- Added new enum
- With members `USER` and `SERVER`
2023-11-26 14:08:05 +02:00
Tristan B. Velloza Kildaire
bd29bbed6b
Queue
...
- Added support for the `ACCEPT_SILENT` queue policy verdict
2023-11-23 21:14:49 +02:00
Tristan B. Velloza Kildaire
ed1a646397
PolicyDecision
...
- Added new member `ACCEPT_SILENT`
2023-11-23 21:13:23 +02:00
Tristan B. Velloza Kildaire
aef9aa8b41
Merge branch 'master' into feature/queueing
2023-11-23 09:46:12 +02:00
Tristan B. Velloza Kildaire
8dbd906b7d
MessageDeliveryTransport
...
- Documented methods
2023-11-23 09:45:59 +02:00
Tristan B. Velloza Kildaire
8a572978af
MessageDeliveryTransport
...
- Documented the interface
2023-11-23 09:44:52 +02:00
Tristan B. Velloza Kildaire
dc741db0e4
Merge branch 'master' into feature/queueing
2023-11-23 09:40:52 +02:00
Tristan B. Velloza Kildaire
f11c81d599
Message
...
- Documented
2023-11-23 09:40:39 +02:00
Tristan B. Velloza Kildaire
44e8771ee4
Merge branch 'master' into feature/queueing
2023-11-23 09:27:06 +02:00
Tristan B. Velloza Kildaire
9e137e4301
Server
...
- Print out the found `User*` (tostring it) when found in `onOutgoing(Message latest, Queue from)`
2023-11-23 09:26:50 +02:00
Tristan B. Velloza Kildaire
1d8c0044a8
USer
...
- Implemented `toString()`
2023-11-23 09:26:20 +02:00
Tristan B. Velloza Kildaire
0d426220d3
Merge branch 'master' into feature/queueing
2023-11-22 21:55:04 +02:00
Tristan B. Velloza Kildaire
d9b95dac5f
AuthManager
...
- Fixed null pointer dereference error in `getUser(string)` which would occur when a user entry was not found in the hashmap
2023-11-22 21:54:38 +02:00
Tristan B. Velloza Kildaire
8eeb1603bf
Merge branch 'master' into feature/queueing
2023-11-22 21:50:41 +02:00
Tristan B. Velloza Kildaire
e54f7f2d8a
Server
...
_ Print warnings when either `fromUser` or/and `toUser` lookups fail
2023-11-22 21:50:29 +02:00
Tristan B. Velloza Kildaire
498d9b4580
Merge branch 'master' into feature/queueing
2023-11-22 21:49:24 +02:00
Tristan B. Velloza Kildaire
dd90aa7a5e
Server
...
- Added stubs for null checking for the `User*`'s
2023-11-22 21:49:03 +02:00
Tristan B. Velloza Kildaire
9205c5cd06
AuthManager
...
- `getUser(string username)` will now return `null` if the user could not be found, else the `User*` is returned
2023-11-22 21:48:40 +02:00
Tristan B. Velloza Kildaire
cef970944a
Server
...
- When `onOutgoing(Message, QUeue)` is called lookup the `User*`s for the source and destination from the provided `Message`
2023-11-22 21:30:38 +02:00
Tristan B. Velloza Kildaire
dff66decae
Message
...
- Added `getFrom()`, `getDestination()` and `getMessage()`
2023-11-22 21:29:39 +02:00
Tristan B. Velloza Kildaire
0efc62d388
MessageManager (unittests)
...
- Added a unittest which tests the delivery of messages
2023-11-22 16:39:31 +02:00
Tristan B. Velloza Kildaire
e9d315f58c
Queue (unittests)
...
- Moved near `Queue` type
2023-11-22 16:33:14 +02:00
Tristan B. Velloza Kildaire
f7c9eb3e1b
Queue (unitests)
...
- Added a unit test to test out the enqueue hooks (negative case)
2023-11-22 16:30:38 +02:00
Tristan B. Velloza Kildaire
2f86da810a
Merge branch 'master' into feature/queueing
2023-11-22 16:23:33 +02:00
Tristan B. Velloza Kildaire
fe5f05d532
Update d.yml
2023-11-22 16:20:23 +02:00
Tristan B. Velloza Kildaire
4a3aa28357
Update d.yml
2023-11-22 16:19:50 +02:00
Tristan B. Velloza Kildaire
048cf7ca17
Queue (unitests)
...
- Added a unit test to test out the enqueue hooks
2023-11-22 16:18:52 +02:00
Tristan B. Velloza Kildaire
81505399a1
MessageManager
...
- Fixed up comment
2023-11-22 15:56:42 +02:00
Tristan B. Velloza Kildaire
2c5da726ca
MessageManager
...
- Removed call to stub method in `recvq(Message message)`
- Removed call to stub method in `sendq(Message message)`
2023-11-22 15:48:28 +02:00
Tristan B. Velloza Kildaire
03654f5925
MessageManager
...
- Cleaned up
2023-11-22 15:47:47 +02:00
Tristan B. Velloza Kildaire
b8f35bed2c
EnqueueHook
...
- Defined delegate
- Added `dummyHook(..., ...)` as an example of it
Queue
- Added support for enqueue hooks which run after a successful enqueue
MessageManager
- Use the stubs as hooks now
2023-11-22 15:46:26 +02:00
Tristan B. Velloza Kildaire
307f5ed3c6
QueueIntrospective
...
- Added comment
Message manager
- Set `makeSmart(size_t maxSize)` to `100`
2023-11-22 15:29:23 +02:00
Tristan B. Velloza Kildaire
b3e2b483e6
Queue
...
- Removed static factories which refer to out-of-lifetime `SmartPolicy` on stack
- This removes `makeSmart(size_t maxSize)` and `makeSmart()`
2023-11-22 15:17:31 +02:00
Tristan B. Velloza Kildaire
58697b4090
SmartPolicy
...
- Added a `Mode` to the smart policy
- Implemented `shouldTailDrop()`
- The `encat(..., ...)` method now implements the size-based policy as intended
QueueIntrospective
- The `getQueue()` method must now return a `ref` so that we could manipulate it (honestly not sure it is needed anymore)
Queue
- Made `getQueue()` return a `ref`
MessageManager
- Test out `SmartPolicy` by declaring it here (else stack reference using `makeSmart()` bad)
2023-11-22 15:16:34 +02:00
Tristan B. Velloza Kildaire
9bf8839e89
QueueIntrospective
...
- ame all methods protected
Queue
- Changed all `QueueIntrospective` methods to protected
2023-11-22 14:36:30 +02:00
Tristan B. Velloza Kildaire
99d08ff899
MessageManager
...
- Try using a `SmartPolicy`-based queue
2023-11-22 14:31:56 +02:00
Tristan B. Velloza Kildaire
57b4f930b0
PolicyFunction
...
- Switched to a delegate rather such that we can be passed a context pointer as well
SmartPolicy
- Working on a stateful policy
Queue
- Removed `maxSize`
- Updated the constructor to use the nop policy function but need a delegate firstly
- Added `makeSmart(size_t)` and `makeSmart()` which are static factories for `SmartPolicy`-based (stateful) policy functions
2023-11-22 14:31:11 +02:00
Tristan B. Velloza Kildaire
71ed7223ea
Merge branch 'master' into feature/queueing
2023-11-22 12:01:27 +02:00
Tristan B. Velloza Kildaire
6f2f542580
Dub
...
- Require at minimum `gogga` version `2.2.1`
Logging
- Switched logger mode to a clearer one
2023-11-22 12:01:07 +02:00
Tristan B. Velloza Kildaire
632014c96c
Message manager
...
- Repositioned
2023-11-22 11:42:46 +02:00
Tristan B. Velloza Kildaire
c0ecc8f246
PolciyDecision
...
- Documented
2023-11-22 11:42:29 +02:00
Tristan B. Velloza Kildaire
c375be4422
PolciyFunction
...
- Now takes in a `QueueIntrospective`
Queue
- Implemented the `QueueIntrospective` interface
Policies
- Updated `nop(...)` to conform to the new `PolicyFunction` API
2023-11-22 11:39:16 +02:00
Tristan B. Velloza Kildaire
70a036c01b
QueueIntrospective
...
- Added new interface
- Defines the interface which policy functions can use in order to access the internals of a given queue
2023-11-22 11:36:20 +02:00
Tristan B. Velloza Kildaire
67102a267b
Queue
...
- `enqueue(Message)` now respects the policy
2023-11-22 11:26:49 +02:00
Tristan B. Velloza Kildaire
1ee94d5177
Policies
...
- Defined the `nop(Message, Queue)` policy which always returns a true verdict
Queue
- Use the `nop(...)` policy by default
2023-11-22 11:25:59 +02:00