AI really is everyones best friend right now.
There is very minimal examples on the web to properly deal with what I am trying to do in regards to creating a socket. Along with all the little variances needed to make objective C happy... so.. in comes chatgpt.
Using very simple requests, I have made it create the following:
- create a socket connection which then sets up its own event handler and opens the connection
- Loads any received data from the event into a queue.
- Add a function which can read this queue data and return as a byte array
- Add a function which write a string to the socket
- Add a function which checks if the socket connection is open
- Convert the functions into a class which h and m files
The time it takes for me to learn that native language and create this could have been an entire day or more. This was done in a few minutes.
I genuinely could create and entire demo application for iOS and Android using native IDEs with just using chatgpt, and quite frankly, I likely will do exactly that for native examples.
Assuming I don't mess up anything on the importing side, this should hopefully compile and expose these commands from the DLL to start proper testing.