By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,060 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

Sockets vs Http ?

P: n/a
Hi,

if i need to send some data over the net to server

what is the best way (http , socket or other ) to do that ?
Best Regards ,

Tiraman :-)
Nov 20 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Nak
Hi there,
if i need to send some data over the net to server

what is the best way (http , socket or other ) to do that ?


HTTP is a protocol that runs on a socket, and a socket is what is used to
transport data between systems. If you want to run your *own* protocol,
create a new socket (TCP or UDP) using an *unused* port (e.g. 1001), and
then send *your* protocol down it!

I hope this helps!

Nick.
Nov 20 '05 #2

P: n/a

From my understanding: (Not suggesting it is right.)
A Socket is a subdivision of an IP address. Kinda like
saying I live in canada (<-IP), British Columbia (<-
socket).

You can us two protocals when using(not including custom)
the network: UDP and TCP. UDP will just brodcast
information without any error checking. (Good for video
streams, audio,....) If you want to make sure that the
data will arrive safely and correctly, you should use TCP.

The data you want to send can be in formats like HTTP,
witch will go easly accross fire walls. (I beleave that
it is just text being sent around. Nothing "harmful",
unless unassembled on the other side to make something
harmful.)

urg.... Mind went blank, but if you want more information,
buy the book: Network Programming for the microsoft .net
framework
-----Original Message-----
Hi there,
if i need to send some data over the net to server

what is the best way (http , socket or other ) to do
that ?
HTTP is a protocol that runs on a socket, and a socket is what is used totransport data between systems. If you want to run your *own* protocol,create a new socket (TCP or UDP) using an *unused* port (e.g. 1001), andthen send *your* protocol down it!

I hope this helps!

Nick.
.

Nov 20 '05 #3

P: n/a
Tiraman,

The overall best way never exist in programming, that is dependable to the
situation.

When you needs thousands of loads an hour, than that could be a reason to
make your own classes for that.

Whenyou need it for an avarage use, than just use the Http classes, they are
pretty fast. (Standard installed with max 2 connections in a time)

Just my thought,

Cor
Nov 20 '05 #4

P: n/a
Nak
Hi there,

I "socket" simply connects two systems together, an IP address is the
address of the machine over an IP based network. If you connect 2 systems
together using TCP, that is known as a TCP socket, a socket requires a port
and an IP address to attempt to make a connection.

A "protocol" is a strict set of rules for transmitting specific types of
data for set purposes. For example IP based games used bespoke protocols
for speed, AOL IM uses it's own bespoke protocol to create an instant
messaging service, SMTP is a protocol used for sending emails. It's kind of
like a "language" designed for a specific purpose.

A protocols should only interfer with a firewall if the firewall is
either

A) Blocking the port from being used.
B) Sniffing the packets and making assumptions and presumptions,
causing consequentions and making aspertions... and other shuns that
firewalls have a habbit of doing.

But if you tell your firewall to allow connects on a particular port for
a particular application it should *not* give 2 hoots about what is being
sent backwards and forwards because it would not even be able to understand
it! A firewall can analyze recognized protocols for malicious code, such as
HTTP, SMTP or POP3 but not your own bespoke protocol.

TCP and UDP are *low level* protocols used by the network adapter to
transmit data over IP based networks. And yes you are correct, UDP does not
contain fail safe measures; like TCP.

But using HTTP as a protocol in your application would be absurd unless
you are making a web server. It is by far easier to make your *own*
protocol, believe me this is *not* hard, I'm actually making a set of
classes for VB.NET at the moment which make designing your own protocol a
piece of cake. Get into Netlinx, AMX and Crestron then you will understand
all about protocols, including how to rip them off.

Nick.
Nov 20 '05 #5

P: n/a
Hello Nak,

Thanks For your Gr8 Explanations!
"Nak" <a@a.com> wrote in message
news:#T*************@TK2MSFTNGP11.phx.gbl...
Hi there,

I "socket" simply connects two systems together, an IP address is the
address of the machine over an IP based network. If you connect 2 systems
together using TCP, that is known as a TCP socket, a socket requires a port and an IP address to attempt to make a connection.

A "protocol" is a strict set of rules for transmitting specific types of data for set purposes. For example IP based games used bespoke protocols
for speed, AOL IM uses it's own bespoke protocol to create an instant
messaging service, SMTP is a protocol used for sending emails. It's kind of like a "language" designed for a specific purpose.

A protocols should only interfer with a firewall if the firewall is
either

A) Blocking the port from being used.
B) Sniffing the packets and making assumptions and presumptions,
causing consequentions and making aspertions... and other shuns that
firewalls have a habbit of doing.

But if you tell your firewall to allow connects on a particular port for a particular application it should *not* give 2 hoots about what is being
sent backwards and forwards because it would not even be able to understand it! A firewall can analyze recognized protocols for malicious code, such as HTTP, SMTP or POP3 but not your own bespoke protocol.

TCP and UDP are *low level* protocols used by the network adapter to
transmit data over IP based networks. And yes you are correct, UDP does not contain fail safe measures; like TCP.

But using HTTP as a protocol in your application would be absurd unless you are making a web server. It is by far easier to make your *own*
protocol, believe me this is *not* hard, I'm actually making a set of
classes for VB.NET at the moment which make designing your own protocol a
piece of cake. Get into Netlinx, AMX and Crestron then you will understand all about protocols, including how to rip them off.

Nick.

Nov 20 '05 #6

P: n/a
Thanks!

i will read some more about it.

bye

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:ee**************@TK2MSFTNGP09.phx.gbl...
Tiraman,

The overall best way never exist in programming, that is dependable to the
situation.

When you needs thousands of loads an hour, than that could be a reason to
make your own classes for that.

Whenyou need it for an avarage use, than just use the Http classes, they are pretty fast. (Standard installed with max 2 connections in a time)

Just my thought,

Cor

Nov 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.