File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
websocket/endpoint-async/src/main/java/org/javaee7/websocket/endpoint/async Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 3737 * only if the new code is made subject to such option by the copyright
3838 * holder.
3939 */
40- package org .javaee7 .websocket .endpoint ;
40+ package org .javaee7 .websocket .endpoint . async ;
4141
4242import javax .websocket .OnMessage ;
43+ import javax .websocket .Session ;
4344import javax .websocket .server .ServerEndpoint ;
4445
4546/**
4647 * @author Arun Gupta
4748 */
48- @ ServerEndpoint (value = "/websocket" )
49+ @ ServerEndpoint ("/websocket" )
4950public class MyEndpoint {
5051
5152 @ OnMessage
52- public String echoText (String name ) {
53- return name ;
53+ public void echoText (String test , Session session ) {
54+ session . getAsyncRemote (). sendText ( test ) ;
5455 }
5556}
You can’t perform that action at this time.
0 commit comments