ofxHTTP icon indicating copy to clipboard operation
ofxHTTP copied to clipboard

Can we use this addon to make a Websocket client?

Open Meach opened this issue 5 years ago • 5 comments

Hello,

I want to use websockets and make a client that would connect to my websocket server made with nodejs. I see the readme note about using ofxJSONRPC to use websockets. Thing is: I really don't want to use JSON RPC, only bare websockets. I had a look at the code but I do not understand how to make a simple websocket client.

Any hints or example will be great.

Thanks!

Meach avatar Dec 12 '19 13:12 Meach

So to be clear I understand, you want to connect from an OF app to web server with web sockets (as a client)?

ofxJSONRPC is an a way of making an oF server.

On Thu, Dec 12, 2019, 7:33 AM Mathieu [email protected] wrote:

Hello,

I want to use websockets and make a client that would connect to my websocket server made with nodejs. I see the readme note about using ofxJSONRPC to use websockets. Thing is: I really don't want to use JSON RPC, only bare websockets. I had a look at the code but I do not understand how to make a simple websocket client.

Any hints or example will be great.

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bakercp/ofxHTTP/issues/53?email_source=notifications&email_token=AACJLRE6M7NHJ2CQ2BARX3DQYI4UBA5CNFSM4JZ6S63KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IABVYUA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACJLREY45EMOAH2YPFABXDQYI4UBANCNFSM4JZ6S63A .

bakercp avatar Dec 14 '19 14:12 bakercp

Yes, in the past I used ofxJSONRPC to make this web server and everything was bundled within OF.

Now I want to separate the web part and use nodejs to take care of the webserver and websocket server. OF will only have a websocket client to communicate with it. I thought ofxHTTP is a good starting point for this but looking at the source makes me very confused. I cannot understand how I could make a websocket client app.

Otherwise I found this websocket client example with Poco and was thinking to maybe use it as a starting point if I cannot make a websocket client with your addons.

Meach avatar Dec 16 '19 09:12 Meach

Have you ever found a solution to making a Websocket client with ofxHTTP? I tired ofxLibwebsockets but it collides with my other use of ofxHTTP and ofxSSLManager.

stephanschulz avatar Nov 17 '20 16:11 stephanschulz

I ended up using ofxSocketIO for this purpose. I don't know if it will create some trouble with ofxHTTP or ofxSSLManager as I don't use them anymore.

Meach avatar Nov 18 '20 07:11 Meach

I ended up using a simple websocket with poco and ofxHTTP. https://github.com/stephanschulz/OBS_OF_websocket

stephanschulz avatar Nov 19 '20 12:11 stephanschulz