263 posts
  • Has been part of the Envato Community for over 6 years
  • Located in Antarctica
  • Has sold $100+ on Envato Market
  • Has collected 1+ items on Envato Market
+1 more
x360c says

Which method produces the most lag, resources, and bandwidth. I set up my program/chatroom with URLRequest… and it works pretty good. I just wanna know which is better overall. I only have 1000000 MB of bandwidth per month :/

1234 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has collected 50+ items on Envato Market
+5 more
MBMedia says

sockets are gonna be faster and lighter.

Anytime a computer communicates with another computer it uses sockets. Actually, even when one device on your computer communicates with another device it happens via sockets. Sockets are very low level communication between software. So therefore, when you send your URLRequest, what’s happening is a series of socket connections opening up, requesting data from the server, receiving data from the server, etc, it’s just all automatic. So really a URLRequest is just opening a socket, except with the extra weight and time of opening and closing the connection repeatedly, extra data being sent, extra runtime on the server, etc.

The upside to URLRequest is it being simple and easy, requiring no socket server to be set up, etc. So I’d say if you have a working method with no bugs, and it’s working fast enough etc just using URLRequest, then you may as well stick with it. Cuz the downsides to it don’t seem to be affecting your specific situation :)

23 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has collected 1+ items on Envato Market
+1 more
encoder says

after my knowledge the server handles differently sockets from url.

sockets in basis are used in games, where high speed lag-less communication is needed. but i think that it has a hit on the servers performance due to the low time response.

anyway, other than (games, or streaming data, like chat) that i recommend the good old URLRequest

by
by
by
by
by
by