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 :-) 6 10328
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.
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.
.
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
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.
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.
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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tim Black |
last post by:
My application requires sending a large piece (~2MB) of data to
several devices on a network via TCP sockets. I have experimented with
different methods for doing this and this has raised some...
|
by: mrpolitics |
last post by:
So I'm working with PureIRCD (http://sourceforge.net/projects/pure-ircd)
and everything was fine untill yesterday when the server crashed. So I did
a cold restart and staretd the server back up...
|
by: Snyke |
last post by:
I'm currently looking for a good C++ Wrapper for sockets.
I've already tried http://www.libsockets.net/ but I have some problems
compiling it on Windows.
Does anybody know a smaller (this library...
|
by: Cory Nelson |
last post by:
I've created a new C++ sockets library - small, cross-platform, IPv4
and IPv6. If anyone would like to critique it, I'd appreciate it.
Doesn't support the more exotic protocols - only TCP and UDP....
|
by: Bill English |
last post by:
How do I send an object from one computer to another?
--
I am a 14 year old C# developer, I am completely self taught, so please
don't get mad if I ask a stupid question. Thanks.
|
by: BadOmen |
last post by:
Hi,
What is the different between 'System.Net.Sockets.Socket' and
'System.Net.Sockets.TcpClient'?
When do I use System.Net.Sockets.TcpClient and System.Net.Sockets.Socket??
Yours, Jonas
|
by: Jm |
last post by:
Hi All
Im trying to get a bit of background info on .net.sockets for an app that im
upgrading to be .net. Under vb6 i used the winsock control and would start
it listening and it would call an...
|
by: Aero |
last post by:
Hi,
My window application written in C# is throwing following exception
while connecting to one FTP location
The type initializer for System.Net.Sockets.Socket threw an exception
This exe is...
|
by: rossabri |
last post by:
This topic has been addressed in limited detail in other threads:
"sockets don't play nice with new style classes :(" May 14 2005....
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |