By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,449 Members | 1,601 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,449 IT Pros & Developers. It's quick & easy.

.Net Sockets and QOS

P: n/a
i have been trying to implement QualityOfServive capabilities onto a c
client-Server project i have been working on, and i have reached a dead end.
it seems that in order to implement QOS capabilities on a socket it has to
be created using the WSASocket method- BUT - when doing so i can't see a
way to handle the created socket, using the .Net Socket class.

now, i know there is the IOControl method for the socket that should be the
equivalent of the WSAIoctl but if so, how do i trasform the QOS structure
into a byte array (required for the inValue) ?

The question is, either, how do i implement QOS the .Net way, OR how do i
control a Socket created by WSASocket through the .Net (which i don't know
if possible), and finaly the ultimate question, how do i implement QOS
using .Net?

--
Message posted via http://www.dotnetmonster.com
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Fade,

Can you show the definition of the QOS structure? If it doesn't have
any references (pointers) to anything outside of itself, then you can use
the marshaling infrastructure to perform the conversion, or unsafe code.

With marshaling, you would have to define the structure, and then
allocate unmanaged memory for the structure. Then, you would call the
static StructureToPtr method on the Marshal class to marshal the managed
structure to unmanaged memory.

From there, you can call the static Copy method on the Marshal class to
copy the unmanaged memory to a byte array.

With unsafe code, you can define the structure, and then cast it to a
byte array (assuming you have the array declared), and then use that.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Fade BS via DotNetMonster.com" <fo***@DotNetMonster.com> wrote in message
news:68******************************@DotNetMonste r.com...
i have been trying to implement QualityOfServive capabilities onto a c
client-Server project i have been working on, and i have reached a dead
end.
it seems that in order to implement QOS capabilities on a socket it has to
be created using the WSASocket method- BUT - when doing so i can't see a
way to handle the created socket, using the .Net Socket class.

now, i know there is the IOControl method for the socket that should be
the
equivalent of the WSAIoctl but if so, how do i trasform the QOS structure
into a byte array (required for the inValue) ?

The question is, either, how do i implement QOS the .Net way, OR how do i
control a Socket created by WSASocket through the .Net (which i don't know
if possible), and finaly the ultimate question, how do i implement QOS
using .Net?

--
Message posted via http://www.dotnetmonster.com

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.