Jump to content

Tranfer Protocols?


MrFish

Recommended Posts

I'm just being introduced into the world of these web protocols. Hypertext Transfer Protocol has always been enough for me so I haven't thought about it much. I would like to create web applications that has the ability to send information to the user without the user requesting it. An example would be a chat room, instead of having the user check for entries every second, it should be able to wait for a new entry and send the information to the user. But chat rooms aren't the only thing I want to do, I want ways to keep the users of my site updated constantly on information. My site is a social tool for gamers who need to know what's going on the second it happens and in the future it would be nice to have some desktop applications for this without the user going online. But I'm not familiar with those languages so lets keep future ideas in the future.What other kinds of protocols (if I'm using that term right) can I use to send information to users, and can I do it with php? I've never seen the end of php's capabilities but I think I'm getting close :). I would think this is possible because facebook uses php and it's got notifications and chat. I wouldn't think they are using ajax or anything like that to constantly check for updates, I think that would bog down on the server, wouldn't it?

Link to comment
Share on other sites

I wouldn't think they are using ajax or anything like that to constantly check for updates
That's exactly what they're doing, you can verify that with Firebug if you want to. Any web page is going to work that way, because they all use HTTP.If you want to build a client-server application like a chat client and chat server then you would normally just design your own protocol. A protocol is just a specification on how to send and receive messages, so you can always design your own and then just have both your client and server use it. To make the actual connection you use sockets, your server would open a socket to listen for connections, and your client would connect to the server on a certain predefined port which the socket is using, and then you would want the server to tell the client a different port to use so that the server can continue to listen for other clients on the first port. Once the client and server have the socket connection open either of them can transmit data and either of them can listen for data.http://www.google.com/search?client=opera&...-8&oe=utf-8
Link to comment
Share on other sites

Ok so I can do this with java then? I have a java class right now so that's good. I guess I'll just have to do it the crumby way for now.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...