-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error of BROADCAST_URL #7
Comments
i want to create a socket through which i can listen notification on android device whenever admin issues any notification. |
@d33pak-s1ngh : Actually you need to provide your real-ip-address, which is generated by your lan network. e.g. 192.168.0.234 Please check with command "ifconfig" and replace ip-address with that one. It will work. |
i try that i used ipchickn to check my ip and then try that i.p still got
same error
…On Mar 6, 2017 6:41 PM, "Kishor Mali" ***@***.***> wrote:
Closed #7
<#7>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AWiDMG2ZYM16leDbrXsraQPI678LRzJ8ks5rjAYCgaJpZM4MUHjN>
.
|
@d33pak-s1ngh : please upload the screenshot. We will look into it together. |
ok i tried in windows 7 without changing value of BROADCAST_URL it is on its default 192.168.0.6 and i enter a value in textbox and value is getting stored in to database without any page refresh so this what websocket do?? this can be done with ajax also what i want to do is that whenever any record insert into database i should get notifcation in android app that record has been inserted. can we do that with this websocket plugin which you have provided. |
the real purpose of using websocket is that we can consume server side events and actions at client side without any page refresh. client can be android or ios app or even a web app itself. thank you for any kind of help. |
@d33pak-s1ngh : I think you didn't read README.md. It is doing the same thing what are you thinking about. It is doing without page-refresh. It is just the matter of setting it up properly. I think you didn't started websocket server. |
how do i start a websocket server? |
following is the setting in constant.php it contains my ip address and i change port from 2000 to 8181 just for testing but still getting error. define("POST", "post"); Following is screenshot of error saying that address is already in use. |
@d33pak-s1ngh : Remember, this code will not work on shared hosting server (known issue). Also if you wanna test it on localhost then you must give the ip-address of your machine over LAN (i.e. 192.168.1.xxx like that). |
ok so i will host it on server and use that ip to test. |
will do it sure i want to understand socket |
hii @kishor10d i think everything working fine except that connection.js is not able to make connection with socket server check the following from firefox browser. all this is happening because php server.php command is not executing the script successfully it throws error of BROADCAST_URL error. you are saying that i have to provide lan ip as value of BROADCAST_URL that is also fine. but i have 2 machines connect with same lan ip and you are saying that it will not work with share hosting server so what should i do? |
@d33pak-s1ngh : You need to keep the websocket server running. That warning means your socket is not running. Also instead of ip_address you can give your domain name also. (e.g. example.com). If you have root access then you can make it run on your shared hosting too. Websocket server cannot be keep running, so you have to ping it after some interval. You can schedule a cron job (dirty practice) or refer this http://stackoverflow.com/questions/19487664/how-do-i-keep-a-websocket-server-running-even-after-i-close-the-ssh-terminal |
i dont have a domain name i have an ip address of my server and i have a root access of that server |
whenever i type command php server.php it doesnt give any result then i have to interrupt the service and again fire the command than it gives error that address is already in use. |
@d33pak-s1ngh : It doesn't give any result means it is working. Don't interupt it. and try from your browser. |
finally found the problem and now it is working fine. i open in two tabs and enter some value from one tab which is now appear's in both tab. the problem was after typing command php server.php there was no result so i press ctl+z to stop it then again i try php server.php then it throws error that address is in use because in previous command it started websocket server but after typing it again mess the port. |
thanx kishor i got it but now the problem is i cant keep my cmd open all time . this thing should be running in background all the time. what should i do for it?? |
also i checked your admin panel in codeigniter in codeinsect how i can add this socket feature in to that codeigniter panel? |
Here is the solution for your command line problem. Also you can free your ports by killing the process. Everything explain in the following url. And you ask about CodeInsect Admin Panel, actually it is ready admin panel and you can add your features into it. Its your choice that how you integrate your code into it. Just copy and paste the same things of third_party folder, and implement the controllers into controllers. You can do it easily. |
ook thank you for this awesome work i will try to merge admin panel with socket and inform u. |
when i try to run command php server.php got following error the value of
![socket](https://cloud.githubusercontent.com/assets/23626544/23610961/e25fbae6-029a-11e7-800b-f0ef6a96b66d.png)
BROADCAST_URL is set to a localhost ip that is 127.0.0.1 .
The text was updated successfully, but these errors were encountered: