-
Notifications
You must be signed in to change notification settings - Fork 1
Implement server #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| method listen() { | ||
| supply { | ||
| whenever self.socket-provider.listen($!host, $!port) -> $conn { | ||
| my $connection = Connection.new(:$conn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering whether the Connection should have a Promise that is kept when the CONNECT has been completed (which lets us do the authentication or whatever as well,) so that it's not emitted before we have a valid connection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've implemented that simply. I think there needs to be a hook for authentification.
1433106 to
0603ea5
Compare
| body => .message; | ||
| } | ||
| }; | ||
| $!connected.keep: True; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there also needs to be a timeout (set as a property of the server,) whereby the connection is closed if the 'CONNECT' or 'STOMP' isn't received.
|
Can't believe this was four years ago. How time flies. Anyhow I've got an idea that may off two birds which imma try make a PoC over the weekend. |
a07c699 to
52c5152
Compare
|
I've rebased with a view to merging at some point, but in the intervening years I've come to the view that it would make more sense to re-implement in terms of |
Specifically this provides an implementation of the SUBSCRIBE/UNSUBSCRIBE commands and a Connection object. This is sufficient to make a Stomp server.
52c5152 to
dceb8ea
Compare
|
I'd like to merge this but there appears to be a problem with the tests on Windows if someone has the wherewithal to diagnose that. |
|
The Windows is fixed. The MacOS failure on the last run could conceivably happen on any platform, the pattern used in the test may be unreliable depending on the number of threads available, system load etc. |
Very simplest implementation of a server with fan-out pattern