Http connection or Socket streams

Started by
8 comments, last by roro7007 15 years, 12 months ago
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?
Advertisement
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.)
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.

- clients (java applet) talk to the server....
Can i implemented withput using socket?....
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.
how client can send data to server (remote computer)>>>> any sample code(without using socket)
Quote:Original post by roro7007
how client can send data to server (remote computer)>>>> any sample code(without using socket)


Why do you not want to use sockets?

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
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.
Thanks alot (Cromulent and jpetrie
)for ur clear reply....

This topic is closed to new replies.

Advertisement