J
Jacob
I hope this is the right group for this. I'm trying to write an Nntp class
library that derives from WebRequest and WebResponse. I want to use
WebRequest and WebResponse because it is the model setup in the framework
for generic Internet communication and I want to stick to its benefits of
being protocol-agnostic when implemented correctly.
Question: The WebRequest provides a Method property used to set the command
verb being sent to the remote server, but where can I put other attributes
necessary to most Nntp commands?
For example: the Nntp command XOVER requires a 'range' attribute. XOVER
would be the Method property, but what about the attribute information?
Should I create some sort of attribute collection (like unto the Header
collection) or an attribute property? But then some commands require two
attributes, some ints, some strings? It would be crazy to try and create
properties for every command option and combination. I just don't feel like
this is the correct way to do that. Ideally all commands should be able to
be executed with only setting the Method property verb to make sure that
classes derived from WebRequest can be cast back to a WebRequest and that
the commands can be protocol independent.
If anybody knows what I'm talking about... any direction from anyone would
be helpful.
Thanks,
Jacob
library that derives from WebRequest and WebResponse. I want to use
WebRequest and WebResponse because it is the model setup in the framework
for generic Internet communication and I want to stick to its benefits of
being protocol-agnostic when implemented correctly.
Question: The WebRequest provides a Method property used to set the command
verb being sent to the remote server, but where can I put other attributes
necessary to most Nntp commands?
For example: the Nntp command XOVER requires a 'range' attribute. XOVER
would be the Method property, but what about the attribute information?
Should I create some sort of attribute collection (like unto the Header
collection) or an attribute property? But then some commands require two
attributes, some ints, some strings? It would be crazy to try and create
properties for every command option and combination. I just don't feel like
this is the correct way to do that. Ideally all commands should be able to
be executed with only setting the Method property verb to make sure that
classes derived from WebRequest can be cast back to a WebRequest and that
the commands can be protocol independent.
If anybody knows what I'm talking about... any direction from anyone would
be helpful.
Thanks,
Jacob