-
Notifications
You must be signed in to change notification settings - Fork 37
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
WebSocket implementation is buggy or bad documented. #138
Comments
I had noticed the same issue (among with many others related to memory management, not calling On_Close in all cases, using the stack even when the message is larger than 2MB, some useless conversions back to Unbounded_String,...). For your particular case, I ended up with the following patch, which you or the AWS maintainers are of course free to use.
|
Why not do a pull request with it? |
Feel free to do it, no problem with me ! |
If I was an AdaCore employee I would. |
This is needed to override On_Message and other callbacks, but previous versions were destroying the object created by the user, and we thus ended up with uninitialized fields. Fixes AdaCore#138
I have now created a PR, after cleaning up the code I have been using for a while |
This is needed to override On_Message and other callbacks, but previous versions were destroying the object created by the user, and we thus ended up with uninitialized fields. Fixes AdaCore#138
This is needed to override On_Message and other callbacks, but previous versions were destroying the object created by the user, and we thus ended up with uninitialized fields. Fixes AdaCore#138
Hello,
I have a problem with Web_Socket API in AWS (server side). The
AWS.Net.WebSocket
has this:Looks like to create a custom web socket object one needs to define a function with the same profile and register it with the
Register
procedure. One (like me) could think that this function will be called to construct a custom web socket when a http client call an URL. AWS indeed calls this, but then it will destroy the object. So if you keep the object to send messages to the client it will raisePROTOCOL_ERRORaws-net-buffered.adb:147 access check failed
with traceback like:Property named
C
is reset byFinalize
:Try to run the example from
aws/demos/websockets
under debugger. The exampe tries to add its own fieldC
and populate ith with zero:But when On_Open is called
C
has a garbage:Could you suggest how should I create a Web_Socket object to be able to send some message from the server to the client outside of 'On_Open
and
On_Message` callback?PS Cross-reference to matreshka issue.
The text was updated successfully, but these errors were encountered: