Issue sending data from Objective-C server to swift client
I’m working on a learning project where I’m trying to create a websocket server on macOS using objective-C and a client using swift. I’m able to send message from client to server and it’s getting through fine. After receiving a message on server, I want to send a message back to client. Message is UTF8 encoded. But I’m receiving some receiving garbled text on client(raw data not matching). Now 2 questions –
1)I can’t pin point as to where I’m making the mistake.
2)If there is a better way to build something like this?