mirek / CoreWebSocket

Web Socket Server and Client Library for iOS and OSX. Follows Core Foundation API style.
http://en.wikipedia.org/wiki/WebSockets
142 stars 31 forks source link

Add WebSocket client examples #9

Open jamesjhu opened 10 years ago

jamesjhu commented 10 years ago

I'm currently working on a project that needs to communicate with a WebSocket server. I've looked at the example in the Readme.md file and in main.c but they both seem to be examples for creating a WebSocket listening server and not for setting up a WebSocket client.

After browsing through the headers, it seems that I need to provide a CFSocketNativeHandle object to the creation function WebSocketClientCreate. I'm having trouble understanding what is needed to provide the CFSocketNativeHandle object. I was hoping someone could shed some light on this problem, and also help future users of CoreWebSocket who also want to implement a client. Thanks!