[xSocket-develop] writing a proxy dispatcher to jabber and http server
Status: Inactive
Brought to you by:
grro
|
From: Vic C. <vce...@gm...> - 2009-08-19 05:05:29
|
I need suggestions help w/ design implementation of jabber server and
http server.
Background:
I have tomcat running on port 8088, I have jabber server running on port 5222.
I'd like xsocket to listen to port 80 and 843 and dispatch to 3 cases onData {
data = connection.getStringByDelimiter("/0");
if data.equals("<policy-request/>) return a String ("ACK") - works fine now.
if data is a jabber request proxy to jabber server. (jabber is an xml
"request", but 2 way).
if data is a http request proxy to tomcat
Questions:
How can I identify if data is jabber or http?
Do I need to keep connection/session information for tomcat? (I don't think so).
For it to return a file, for example "swf / flash" or .js to the browser.
Can I just read the http response somehow from tomcat and return that?
Do I need to keep connection/session info for jabber server? (I think so).
How, do I track connections and pass that on to jabber? I think Jabber
IS state full.
Also jabber server could want to talk to ANY "session"/connection.
And last, how would I make it ... not slow.
ideas?
tia,
.V
|