views:

202

answers:

2

I've done some research, and there is very little (basically none) information on how to create a socket of type SeqPacket in C# doing this will fail:
listenerSocket = new Socket(AddressFamily.InterNetwork, SocketType.Seqpacket, ProtocolType.Tcp);
I'm new to networking, so I'm probably doing something really stupid.

+1  A: 

SocketType.Seqpacket is only supported in NetBIOS. There is no reason to use this with TCP connections.

See this MSDN thread for details.

Reed Copsey
Sounds like it falls quite solidly under the "doing something stupid" heading then ;)I want a packet based connection rather than a stream based one. So I assume I should use rdm instead? or should I just use a stream and figure out some way of simulating packets (prefix the length, delimiting sequence etc)?
Martin
+1  A: 

If you're new to networking, then I suggest that you stay away from low level stuff like sockets, unless this is homework. Use WCF instead.

John Saunders
I just sat down and decided I'd teach myself how to use sockets properly, I've messed with them a bit before but never properly. I may have a look at wcf anyway because I've never even heard of that.
Martin
"WCF" == "Windows Communications Framework". Does web services, and everything else, including named pipes, so maybe you'd get your seqpacket back.
John Saunders
Just been having a quick look on google, looks promising. Still going to fiddle with sockets first though ;)
Martin