Hi,
Is it possible for a Websocket client to send some parameters (as path
params or as query params) to a Websocket Server at the time of creating
the connection?
Right now, the Websocket client which I'm writing is sending parameters
after connecting to the Webocket server, in a message, as below (line no
16):
1. <script>
2. var url = 'ws://localhost:9763/sample/ws/server.jag';
3. function start() {
4. ws = new WebSocket(url);
5. ws.onopen = function() {
6. //
7. };
8. //event handler for the message event in the case of text frames
9. ws.onmessage = function(event) {
10. //
11. };
12. ws.onclose = function() {
13. //
14. };
15. ws.onopen();
16. ws.send("parameter1,parameter2");
17. }
18. </script>
Is there any better way for a Websocket client to send parameters to a
server?
Thanks,
Dilini
--
*Dilini Muthumala*
Senior Software Engineer,
WSO2 Inc.
*E-mail :* [email protected]
*Mobile: *+94 713-400-029
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev