title: How to set protocol type in MFC
body: <p>I want to be able to set the protocol type when I create my CSocket.  As far as I've been able to figure out you can set the second parameter to SOCK_STREAM or SOCK_DGRAM which respectively is tcp or udp.  So I was wondering if there is a way to use other protocols in the CSocket class in MFC.  Here is my code to receive the connection and data.</p>
  
  <pre><code>CSocket sck;
  sck.Create(1234, SOCK_STREAM);
  sck.Listen();
  
  CSocket clientSck;
  sck.Accept(clientSck);
  char msg[128];
  clientSck.Receive(msg, 128);
  
  CString str;
  str = msg;
  
  clientSck.Close();
  sck.Close();
  </code></pre>