| |
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 :-) | | | | re: Sockets vs Http ?
Hi there,
[color=blue]
> if i need to send some data over the net to server
>
> what is the best way (http , socket or other ) to do that ?[/color]
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. | | | | re: Sockets vs Http ?
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
[color=blue]
>-----Original Message-----
>Hi there,
>[color=green]
>> if i need to send some data over the net to server
>>
>> what is the best way (http , socket or other ) to do[/color][/color]
that ?[color=blue]
>
>HTTP is a protocol that runs on a socket, and a socket is[/color]
what is used to[color=blue]
>transport data between systems. If you want to run your[/color]
*own* protocol,[color=blue]
>create a new socket (TCP or UDP) using an *unused* port[/color]
(e.g. 1001), and[color=blue]
>then send *your* protocol down it!
>
>I hope this helps!
>
>Nick.
>
>
>.
>[/color] | | | | re: Sockets vs Http ?
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 | | | | re: Sockets vs Http ?
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. | | | | re: Sockets vs Http ?
Hello Nak,
Thanks For your Gr8 Explanations!
"Nak" <a@a.com> wrote in message
news:#T8jPRKdEHA.596@TK2MSFTNGP11.phx.gbl...[color=blue]
> 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[/color]
port[color=blue]
> and an IP address to attempt to make a connection.
>
> A "protocol" is a strict set of rules for transmitting specific types[/color]
of[color=blue]
> 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[/color]
of[color=blue]
> 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[/color]
for[color=blue]
> 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[/color]
understand[color=blue]
> it! A firewall can analyze recognized protocols for malicious code, such[/color]
as[color=blue]
> 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[/color]
not[color=blue]
> contain fail safe measures; like TCP.
>
> But using HTTP as a protocol in your application would be absurd[/color]
unless[color=blue]
> 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[/color]
understand[color=blue]
> all about protocols, including how to rip them off.
>
> Nick.
>
>[/color] | | | | re: Sockets vs Http ?
Thanks!
i will read some more about it.
bye
"Cor Ligthert" <notfirstname@planet.nl> wrote in message
news:ee0JErHdEHA.2664@TK2MSFTNGP09.phx.gbl...[color=blue]
> 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[/color]
are[color=blue]
> pretty fast. (Standard installed with max 2 connections in a time)
>
> Just my thought,
>
> Cor
>
>[/color] |  | | | |