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,
AaronHi 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" <kuya789@.yahoo.com> wrote in message
news:O56fHf%23QFHA.2348@.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
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" <kevin@.DIESPAMMERSDIEtakempis.com> wrote in message
news:ebCq0mBRFHA.164@.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" <kuya789@.yahoo.com> wrote in message
> news:O56fHf%23QFHA.2348@.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
>>
> 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" <kuya789@.yahoo.com> wrote in message
news:utp4WTERFHA.3336@.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" <kevin@.DIESPAMMERSDIEtakempis.com> wrote in message
> news:ebCq0mBRFHA.164@.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" <kuya789@.yahoo.com> wrote in message
>> news:O56fHf%23QFHA.2348@.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
>>>
>>
>>
0 comments:
Post a Comment