nsoutputstream

Putting NSString into uint8_t buffer

I'm working with sockets and trying to simply write a string to the socket. I found a couple of examples on how to do this, such as the following example (oStream is an NSOutputStream). This is all within the NSStreamEventHasSpaceAvailable. uint8_t buffer[11] = "I send this"; int len; len = [oStream write:buffer maxLength:s...

Tilde in device name causing problems with NSOutputStream socket

In the networking between the iPhone and desktop versions of our application, the iPhone sends over the device name for use on the desktop. The problem is that some of the beta testers have tildes (`) in their device names. For some reason when this is in the device name it prevent the socket from sending the actual string data. I've tr...

Cocoa NSOutputStream send to a connection

Hi, I am new to Cocoa, but managed to get a connection (to a FTP) up and running, and I've set up an eventhandler for the NSInputStream iStream to alert every response (which also works). What I manage to get is simply the hello message and a connection timeout 60 sec, closing control connection. EDIT: I guess my question is "without ...

Writing 64 bit int value to NSOutputStream

I'm having trouble communicating position coordinates to a set of motors I have connected on the network. I can send a string just fine, and receive text back from the motor, but I can't seem to send it an int value. Using NSlog I have determined that the actual value I'm sending is correct, however I suspect my method of sending it via...