473,513 Members | 2,519 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

tcpclient socket webrequest

tcpclient socket webrequest
what are each used for? I read some reference books and did some research on
the internet, but I'm still confused.
could someone clarify this for me?
Thanks,
Aaron
Nov 19 '05 #1
3 1813
Hi Aaron,

Basically, you're lloking at similar types of classes for different levels
of network communication.

A Socket is a class for any type of network connection. It is a low-level,
generic class for sending and receiving data over a network, and can work
with virtually any type of protocol.

A TCPClient is a higher-level class for working with the TCP protocol. It
has a Socket (protected Client property) that does the actual connection,
and has properties and methods for communicating via the TCP protocol.

A WebRequest is a higher-level class for sending an HTTP Request over a TCP
connection. It contains properties and methods for sending an HTTP Request,
as well as properties and methods for receiving the HTTP Response that comes
back.

These are an excellent example of how Microsoft provides programming tools
of virtually any level necessary to perform development tasks. For example,
you could write your own TCP Client class by creating a class that uses a
Socket to connect to a TCP port. You could further extend that class by
creating a class that sends an HTTP Request and listens for an HTTP
Response. But Microsoft has already created such classes for you. On the
other hand, if you needed to create an FTP client, which Microsoft has NOT
provided, you could start with a Socket and go from there, building your own
properties and methods to send and receive FTP proptocol messages over a TCP
port.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Aaron" <ku*****@yahoo.com> wrote in message
news:O5****************@tk2msftngp13.phx.gbl...
tcpclient socket webrequest
what are each used for? I read some reference books and did some research
on the internet, but I'm still confused.
could someone clarify this for me?
Thanks,
Aaron

Nov 19 '05 #2
thank you.

i always thought the ftp protocal was built on tcp. so i need to use sockets
instead of tcpclient?

is there anything lower than sockets?
what is the lowest level .Net can access? what about C/native unmanged?

Aaron

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:eb*************@TK2MSFTNGP12.phx.gbl...
Hi Aaron,

Basically, you're lloking at similar types of classes for different levels
of network communication.

A Socket is a class for any type of network connection. It is a low-level,
generic class for sending and receiving data over a network, and can work
with virtually any type of protocol.

A TCPClient is a higher-level class for working with the TCP protocol. It
has a Socket (protected Client property) that does the actual connection,
and has properties and methods for communicating via the TCP protocol.

A WebRequest is a higher-level class for sending an HTTP Request over a
TCP connection. It contains properties and methods for sending an HTTP
Request, as well as properties and methods for receiving the HTTP Response
that comes back.

These are an excellent example of how Microsoft provides programming tools
of virtually any level necessary to perform development tasks. For
example, you could write your own TCP Client class by creating a class
that uses a Socket to connect to a TCP port. You could further extend that
class by creating a class that sends an HTTP Request and listens for an
HTTP Response. But Microsoft has already created such classes for you. On
the other hand, if you needed to create an FTP client, which Microsoft has
NOT provided, you could start with a Socket and go from there, building
your own properties and methods to send and receive FTP proptocol messages
over a TCP port.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
What You Seek Is What You Get.

"Aaron" <ku*****@yahoo.com> wrote in message
news:O5****************@tk2msftngp13.phx.gbl...
tcpclient socket webrequest
what are each used for? I read some reference books and did some research
on the internet, but I'm still confused.
could someone clarify this for me?
Thanks,
Aaron


Nov 19 '05 #3
> is there anything lower than sockets?
what is the lowest level .Net can access? what about C/native unmanged?
Yes, there is PLENTY lower than Sockets. As for the lowest level that .Net
can access, I would have to guess Assembler (not MSIL - Assembler), as C
allows inline Assembler, C++ is a superset of C, and C# allows inline C++
(unsafe/unmanaged). On the other hand, I wouldn't know for sure, as I
haven't had occasion to use Assembler for many years!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Aaron" <ku*****@yahoo.com> wrote in message
news:ut**************@TK2MSFTNGP09.phx.gbl... thank you.

i always thought the ftp protocal was built on tcp. so i need to use
sockets instead of tcpclient?

is there anything lower than sockets?
what is the lowest level .Net can access? what about C/native unmanged?

Aaron

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:eb*************@TK2MSFTNGP12.phx.gbl...
Hi Aaron,

Basically, you're lloking at similar types of classes for different
levels of network communication.

A Socket is a class for any type of network connection. It is a
low-level, generic class for sending and receiving data over a network,
and can work with virtually any type of protocol.

A TCPClient is a higher-level class for working with the TCP protocol. It
has a Socket (protected Client property) that does the actual connection,
and has properties and methods for communicating via the TCP protocol.

A WebRequest is a higher-level class for sending an HTTP Request over a
TCP connection. It contains properties and methods for sending an HTTP
Request, as well as properties and methods for receiving the HTTP
Response that comes back.

These are an excellent example of how Microsoft provides programming
tools of virtually any level necessary to perform development tasks. For
example, you could write your own TCP Client class by creating a class
that uses a Socket to connect to a TCP port. You could further extend
that class by creating a class that sends an HTTP Request and listens for
an HTTP Response. But Microsoft has already created such classes for you.
On the other hand, if you needed to create an FTP client, which Microsoft
has NOT provided, you could start with a Socket and go from there,
building your own properties and methods to send and receive FTP
proptocol messages over a TCP port.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
What You Seek Is What You Get.

"Aaron" <ku*****@yahoo.com> wrote in message
news:O5****************@tk2msftngp13.phx.gbl...
tcpclient socket webrequest
what are each used for? I read some reference books and did some
research on the internet, but I'm still confused.
could someone clarify this for me?
Thanks,
Aaron



Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
9072
by: Daniel | last post by:
TcpClient close() method socket leak when i use TcpClient to open a connection, send data and close the TcpClient with myTcpClientInstance.Close(); it takes 60 seconds for the actual socket on...
3
2603
by: Aaron | last post by:
tcpclient socket webrequest what are each used for? I read some reference books and did some research on the internet, but I'm still confused. could someone clarify this for me? Thanks,...
5
72130
by: Horst Walter | last post by:
What is wrong here? IPAddress ipAddress = IPAddress.Parse("10.10.20.1"); IPEndPoint ipEndPoint = new IPEndPoint(ipAddress, this.port); this.tcpClient = new TcpClient(ipEndPoint); // PROBLEM HERE...
10
25085
by: Abubakar | last post by:
hi, I work on a computer that is part of a network and uses proxy to connect to net. I cant connect to servers outside my proxy with simple ConnectTo code. I need to know how to make my requests go...
3
28617
by: Ricardo Quintanilla | last post by:
i had a problem whom i do not know how to explain. i was using a TcpClient (System.Net.Sockets.TcpClient) object to send and receive data to an AS400 socket. Two months ago it started to work...
4
6297
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
1
4512
by: hamil | last post by:
I am having trouble using the TcpListener and TcpClient classes. At the end of this post is server code that runs, and a class whose purpose is described below. I need to know when the client...
2
2840
by: Martin Arvidsson | last post by:
Hi! I am just beginning to learn about the TcpListener and TcpClient and Socket. I have figured out the TcpListener, it is used for booth in and outgoing requests, right? But when to use...
4
20447
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, I am wondering if I am using TCPClient class in C#, how to setup timeout value? Timeout I mean, when connects to server for the 1st time, and during <timeoutinterval, if no...
5
7269
by: puzzlecracker | last post by:
It looks like i need to get IPEndPoint first, but I cannot figure out from msdn the eventual obtainment of machine name and port number. Please suggest a solution. Thanks
0
7160
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...
1
7099
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...
0
7525
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...
0
5685
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,...
0
4746
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...
0
3233
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...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.