[Libwebsockets] Hello andy or anyone i am in need of help.
andy at warmcat.com
Tue Jan 27 01:13:26 CET 2015
On 27 January 2015 06:16:01 GMT+08:00, "Genusis Andrew ." <lordsatin at hotmail.com> wrote:
>not sure what email to send this to but i am currently having issues
>sending data to a web server i am connecting too. I do not know what
>kind of socket the web server uses but apparently im having issues
>sending and receiving anything bigger than a ping. I have tried several
So you can establish a websocket connection okay... that's something.
>methods shown in tutorials etc none of them work. Currently i am trying
>to connect to hitbox.tv to make a chat bot for them and they require
>the use of a web socket so i decided to use yours however i can't get
>it to fully work..... maybe you can review my code and tell me what i
>need to do to properly send data and act as a client to their web
>server which sends and receives data via port 80.
>this is the above libwebsockets code i am using which is not working
>correctly. Hopefully you can help me so i can get this bot up and
>running as i'm converting this down from a C# bot which can't handle
>Please let me know if you can help me =[.
Look again at the test client main loop.
After you initialize the context, you must sit in a "service loop" to make lws work.
Actually when you ask for the client connection, it returns after starting the connection process. You don't become connected until later, in the service loop, and the various callbacks occur from the service loop.
You don't seem to have any service loop.
More information about the Libwebsockets