Sockets VS web request (80)

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
johnj
php-forum Super User
php-forum Super User
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Tue Aug 27, 2013 7:58 pm

By comparing web browser with sockets you are actually comparing apples with oranges. A browser itself uses multiple socket connections to complete a task.

johnj
php-forum Super User
php-forum Super User
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Thu Aug 29, 2013 10:02 pm

If you have something that is already built-in and if it is faster and useful to you then use that. In this case, you say that the so called "browser" is better. In that case, use the browser.

But, there will cases or situations where you do not have anything "ready made" and the only solution to implement it (your networked application problem) will be to write your own method from scratch. In this scenario go for socket programming. You can use any programming language for this as long as it supports the Socket API.

johnj
php-forum Super User
php-forum Super User
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Sat Aug 31, 2013 1:03 am

Please read this book
http://www.amazon.com/Unix-Network-Prog ... 0131411551

This book may not tell you when to use socket programming but will give you a feel (trend) of what type of applications programs use sockets. But, again there are no strict rules, it is you who will decide based on the situation. For example: Even if I have a built in method that will satisfy my need but if I find that it (the method) is not reliable (as it is buggy), then I will go ahead and write my own method. In another instance I might go ahead and use an open source library even if I find that it is not reliable. So, everything depends on the situation

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests