471,348 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,348 software developers and data experts.

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
Jul 21 '05 #1
3 2481
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

Jul 21 '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


Jul 21 '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



Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Daniel | last post: by
10 posts views Thread by Abubakar | last post: by
3 posts views Thread by Ricardo Quintanilla | last post: by
3 posts views Thread by Aaron | last post: by
2 posts views Thread by Martin Arvidsson | last post: by
4 posts views Thread by =?Utf-8?B?R2Vvcmdl?= | last post: by
1 post views Thread by Ronak mishra | last post: by

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.