473,788 Members | 3,057 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sockets vs Http ?

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
6 10347
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

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
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
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
Hello Nak,

Thanks For your Gr8 Explanations!
"Nak" <a@a.com> wrote in message
news:#T******** *****@TK2MSFTNG P11.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
Thanks!

i will read some more about it.

bye

"Cor Ligthert" <no**********@p lanet.nl> wrote in message
news:ee******** ******@TK2MSFTN GP09.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6985
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 questions about the implementation of Python sockets. (both methods use blocking sockets) Method 1: Calls socket.sendall(data) for each device in sequence, all in a single thread.
0
1831
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 now it's throwing this stream of errors right away. Does anyone have any idea what they mean. I havn't changed the source at all since it was working (which was for four days). It errors here saying An unhandled exception of type...
1
3086
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 is pretty heavy after all) sockets wrapper?
10
2720
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. It also lacks get/setsockopt and ioctl, but those may be added in the future. There is no webpage for it yet, I plan on making one once I'm 100% sure of everything. For now the source is available here: http://dev.int64.org/netx.zip PS....
7
2319
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.
4
6321
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
2
1235
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 event once the connection attempt is made to it and you would do all you had to do, close the connection and reopen. I cant seem to find out how this works with .net.sockets. The code i have seen seems to always talk about listening only the once...
6
13021
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 working fine on staging environment, (Window 2003) but after migrating to production environment (Windows 2000), throwing this exception at
0
1453
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. http://groups.google.com/group/comp.lang.python/browse_thread/thread/76d27388b0d286fa/c9849013e37c995b "Subclassing socket" Dec 20 2005 - Jan 14 2006. http://groups.google.com/group/comp.lang.python/browse_thread/thread/391728cd442339c8/c0581b9ee5e7ceaf Briefly, the socket module ("socket.py") provides a...
0
10172
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9964
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5535
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.