title: Calling BeginRead from a NetworkStream
body: <p>Ok I want to connect to a <code>Socket</code> and read a network stream using the <code>System.Net.Sockets.NetworkStream</code> class. This is what I have so far:</p>
  
  <pre><code>NetworkStream myNetworkStream;
  Socket socket;
  
  socket = new Socket(AddressFamily.InterNetwork, SocketType.Raw, 
      ProtocolType.IPv4);
  socket.Connect(IPAddress.Parse("8.8.8.8"), 8888);
  
  myNetworkStream = new NetworkStream(socket);
  
  byte[] buffer = new byte[1024];
  int offset = 0;
  int count = 1024;
  
  myNetworkStream.BeginRead(buffer, offset, count, ??, ??);
  </code></pre>
  
  <p>Now I need an <code>AsyncCallback</code> and an <code>Object state</code> to complete my <code>BeginRead</code> method but I'm not even sure if this is going to work. I'm a bit lost at this point! Where do I need to go from here?</p>