• Post Reply Bookmark Topic Watch Topic
  • New Topic

TCP Vs HTTP  RSS feed

 
Bhaskar Selvaraju
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have a chat program that works fine, but its not accessible behind firewalls !!! so i am really stuck, please let me know what r the options i have and send me some code snippets if u can. Can someone pls explain HTTP TUNNELLING too?
Bhaskar
 
David Weitzman
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Http tunneling is when the client and server pretend that the client is downloading a document over http, but revert to another protocol.
Client:
URL url = new URL("http://host/servlet/com.host.HttpTunnelServlet");
URLConnection uc = url.openConnection();
InputStream in = uc.getInputStream();
OutputStream out = uc.getOutputStream();
// now you are connected. do what you want
Server (com.host.HttpTunnelServlet) -- something similar to this:
public void doGet(req, resp) {
InputStream in = req.getInputStream();
PrintWriter out = resp.getWriter();
// do what I want
}
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!