title: How can i convert NSData to const uint8_t?or getting error while passing a NSData over Wifi
body: <p>i have a array with two strings:  </p>
  
  <pre><code>NSArray *sendingArray = [[NSArray alloc]initWithObjects:@"CAT",@"DOG",nil];
  </code></pre>
  
  <p>and i converted the array to NSData:  </p>
  
  <pre><code>NSData *myData = [NSKeyedArchiver archivedDataWithRootObject:sendingArray];
  </code></pre>
  
  <p>now i need to convert my <code>NSData(myData)</code> to <code>const uint8_t</code></p>
  
  <p>i am doing this code to send an array of values through Wifi network.</p>
  
  <p>i send successfully a string over wifi using the below code(my string is "string").</p>
  
  <pre><code> const uint8_t *message = (const uint8_t *)[string UTF8String]; 
  
      [_outStream write:bytes maxLength:len];
  </code></pre>
  
  <p>i wrote the below code to send NSData object but it got error.</p>
  
  <p>code is:</p>
  
  <pre><code>const uint8_t *bytes = (uint8_t)[myData bytes];//this line getting error.
      [_outStream write:bytes maxLength:len];
  </code></pre>
  
  <p>can i send my <code>NSData(myData)</code> through the above method without converting it to const uint8_t? if yes,please give me the code that i need to write.</p>
  
  <p>or can any one tell me the way to convert my <code>NSData(myData)</code> to <code>const uint8_t</code></p>