Hi Christopher,
By decorating a Tapestry Service by @ServerEndPoint You can use all
Tapestry benefits like Injection etc.
You don't need to start any additional servers.. the application is already
deployed on Tomcat and Tomcat will serve classes decorated by
@ServerEndPoint. Important is to exclude the WS Pats from Tapestry's filter.
The code avove is usefull when You use the server standalone (without
Tomcat). Ffrom the Java-Websocket Docs: A WebSocket server by itself
doesn't do anything except establish socket connections though HTTP. After
that it's up to *your* subclass to add purpose.

kind regards
Eugen

пн, 11 июн. 2018 г. в 13:45, Christopher Dodunski <
[email protected]>:

> I like the look of the WebSocket library below:
>
> https://github.com/TooTallNate/Java-WebSocket
>
> It is 100% Java, and includes example code for both server and client.
> Also, it supports multi-threading 'out of the box'.
>
> If I were to use this library's server code, placed in the Tapestry
> 'services' directory, must I still decorate the server class with
> @ServerEndPoint for Tomcat/Tapestry to direct WebSocket connections to it?
>
> Also, where would you recommend placing the below lines of start up code
> in order to run the WebSocket server inside the 'services' directory?
>
>   WebSocketServer server = new SimpleServer(new InetSocketAddress(host,
> port));
>   server.run();
>
> Thanks,
>
> Chris.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to