react-redux-socketio-chat icon indicating copy to clipboard operation
react-redux-socketio-chat copied to clipboard

Why do you send the same message twice?

Open cisen opened this issue 8 years ago • 4 comments

You use socket to send the message and use http(post) to send it again. I think socket is enough.

cisen avatar Apr 03 '16 10:04 cisen

I use socket to send it to other clients and http post to send it to the database. What do you mean?

raineroviir avatar Apr 03 '16 21:04 raineroviir

I mean that it is a waste to transfer data twice after login. You can catch the data by socket and then save it into DB.

cisen avatar Apr 04 '16 07:04 cisen

Wow I never though about that!

raineroviir avatar Apr 04 '16 07:04 raineroviir

actually you should not broadcast the message before saving it to the database :P

digital-flowers avatar Dec 16 '16 09:12 digital-flowers