Closed zuoweiphp closed 8 years ago
There's not enough information to go on here to start troubleshooting the problem.
You pasted code that hundreds of others are using without issue, and aren't including how you're calling that code.
Also, I can tell you with absolute certainty that the cause of your issue isn't coming from any one of those lines of code that you posted.
Posting that your WebSockets connection failed because reserved bits are being used, and posting the body of the send()
method is like walking up to a veterinarian, saying your pet keeps on puking, then describing how a mouth is supposed to work. Sure, the puke comes out of the mouth, but that's not the cause of the pet's problem, and without bringing the pet around (or at least giving hints about what might be causing the pet's distress, like any changes in diet, access to poison, etc.,) then the veterinarian isn't going to be able to help... and just like our hypothetical veterinarian doesn't know if your pet is a cat, dog, horse, or fish, we don't know what type of server you're writing, whether it's a data feed, a chat server, a game network layer, or whatever.
So, quick bit of homework for you: Figure out what's relevant, and what we can use to start troubleshooting your issue. We do want to help. Helping feeds our egos, and in the world of open source software, that's really the only compensation we can expect. We can't help you if we don't know what to help with, though.
First rsv bit are bug because they are considered string when they should be INT.
Second you should check this function
checkRSVBits($headers,$user) { // override this method if you are using an extension where the RSV bits are used.
when I used