You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2013/05/09 04:42:44 UTC
[Bug 54942] New: a design question of websocket
https://issues.apache.org/bugzilla/show_bug.cgi?id=54942
Bug ID: 54942
Summary: a design question of websocket
Product: Tomcat 7
Version: 7.0.39
Hardware: PC
OS: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: gaochang20@126.com
Classification: Unclassified
hi,boys:
there is a design question in the bound!
for example:
in my wesocketservlet, i write a loop in broadcast.
eg.
private void broadcast(String message) throws IOException{
String mmstr = "";
while(true) {
for (ChatMessageInbound connection : connections) {
String msg = "update:[" + mmstr +"] is over";
CharBuffer buffer = CharBuffer.wrap(msg);
connection.getWsOutbound().writeTextMessage(buffer);
}
}
}
now,how did the servlet know it when the brower is closed?
i hope you could add a boolean in the connection so that i can filter the
connection,then change the condition of while
(true).or just a empty while with a Thread.sleep().
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54942] a design question of websocket
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54942
Chuck Caldarale <ch...@unisys.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Chuck Caldarale <ch...@unisys.com> ---
Bugzilla is not a question and answer forum. Post your query on the Tomcat
users' mailing list.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org