Using Sockets in .NET framework for providers other than AddressFamily "Internetwork"

N

N Fisher

We have developed a sockets provider for a custom comms card that
allows developers to use standard Winsock2 sockets calls to access it
and we'd like to offer .NET framework compatibility.

Unsurprisingly all of the samples revolve around the AddressFamily
InterNetwork, end points of type IPEndPoint and ProtocolType.TCP or
somesuch related protocol, which is fine for the LAN or Dial-up
Internet connections. To get through to our sockets provider from a
..NET app (in C#), we have created a new endpoint type:

public class OurEndPoint : System.Net.EndPoint
{
public OurEndPoint()
{
//
// TODO: Add constructor logic here
//

}

public override System.Net.Sockets.AddressFamily AddressFamily
{
get
{
return AddressFamily.Unknown;
}
}
}

Listening on a socket involves specifying an AddressFamily, SocketType
and ProtocolType. There's absolutely no guidance on what to put here
to get through to a particular sockets provider or what we have to
derive to allow it.

We've tried this among other things...

listener = new Socket (AddressFamily.Unknown, SocketType.Seqpacket,
ProtocolType.Unknown);
listener.Bind(endpoint);

But nothing gets to our provider.

Any suggestions?

N Fisher
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top