Extending network protocols in .Net 1.1

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey guys, sorry if this is the wrong area to post but I couldn't find a more
specific one which fit the topic.

I've recently been looking to implement some basic ftp features into an
application i'm writing for my company, so in my search for information on
the topic I came across a code sample from microsoft on extending pluggable
protocols.

I've printed and analysed the code, and i've got to say I understand the
problem base a lot better now, however I've noticed a problem. MSDN library
tells me that WebRequests are one-shot deals, they're designed to send a
command, get a response, then be thrown away. This is fine for stateless
protocols like http but for ftp this isn't what I want at all. I need this
software to be able to traverse a directory tree, get file information, pick
and move files around. What I don't want is to have to log off and re-login
every time I want to do one of those options, not when theres a perfectly
good connection already established.

Basically, my question is should I attempt to subvert the
webresponse//request framework and how it's meant to work, or should I just
forget about the pluggable framework all together and hit the sockets.
 
Well, if you use the .Net Framework 2.0, it includes an FtpWebRequest and
FtpWebResponse class, but if you are stuck with 1.1, you will be better off
going directly to sockets.

FTP isn't complex. The hardest part will be setting up your link. After
that, there are only a dozen or so message types to send and receive.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
A watched clock never boils.
 
Thanks.

I did hear that there was an ftp web request in 2.0 (although, if its part
of the web request class wouldn't it too suffer the one request, one command,
stateless design problem?)

I'd be happy to move to 2.0 but my boss isn't so keen. It might take months
to convince him to make the move, if I ever do. Either way, thanks, I think
i'll hit the sockets. Will make a nice library anyway.
 
Back
Top