I am using CocoaHTTPServer library and trying to transmit binary data to a web socket. Web socket opens successfully, and can receive strings from iOS without problem. However, when I try to send a binary data through the socket, I get a Could not decode a text frame as UTF-8 error in Chrome.
Has anyone successfully transferred binary data from iOS through web sockets? (It's a UIImage in my case)
CocoaHTTPServer has a sendData:(NSData *)data method which I'm using but to no success. When I use sendMessage:(NSString *) it works without problem (which essentially converts the NSString to NSData using UTF-8 encoding)