Sign in to follow this  
roro7007

Http connection or Socket streams

Recommended Posts

Dear All, I would like to build online multiplayer game.... I dont know what to use ? Http Connection or Sockect Streams (for communication between clients and server) Any one guide me please?

Share this post


Link to post
Share on other sites
Sockets. You may want to get started by reading Beej's Guide to Network Programming.

(HTTP is a protocol, one ill-suited to implementing the messaging you generally require in a game. Sockets are a means of providing remote -- networked -- communication endpoints between machines. You need sockets to build a HTTP implementation; your confusion over their parity, or lack thereof, probably stems from the fact that there are a lot of classes floating around in a lot of framework code that are design to provide connection-oriented HTTP implementations without having you deal with the low-level socket stuff.)

Share this post


Link to post
Share on other sites
Thankx for ur reply....

You said:
there are a lot of classes floating around in a lot of framework code that are design to provide connection-oriented HTTP implementations without having you deal with the low-level socket stuff.)

can you guide me to any link that provide details about connection-oriented Http implementation.

Share this post


Link to post
Share on other sites
Quote:
Original post by roro7007

- clients (java applet) talk to the server....
Can i implemented withput using socket?....


Sockets are used in TCP/IP which is the protocol that the internet is built on pretty much. Therefore if you are connecting to a remote machine over the internet you will be using sockets. Maybe not directly in your code if you are using a very high level language but fundamentally you will be using sockets.

HTTP is a socket based protocol used for transferring hyper text (web pages) over the internet.

Share this post


Link to post
Share on other sites
Quote:
Original post by roro7007
what is the advantage of using socket to send data?
is there any other way to send data (not socket)? may be easier-- high level way


Sockets are high level. That is why they were invented to hide the packet handling that you would have to do otherwise manually.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this