Coder Social home page Coder Social logo

kishor10d / codeigniter-ratchet-websocket Goto Github PK

View Code? Open in Web Editor NEW
93.0 15.0 67.0 2.06 MB

This library contains the demo of commenting/posting realtime using CodeIgniter+AngularJS+Ratchet PHP Websocket

PHP 99.40% HTML 0.31% JavaScript 0.27% Hack 0.02%
ratchet codeigniter-ratchet-websocket websockets codeigniter realtime

codeigniter-ratchet-websocket's People

Contributors

kishor10d avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codeigniter-ratchet-websocket's Issues

Connection Timeout when send message

Hi,
First of all thank you for this great work.
I have ran your code and it worked fine. I decided to websocket for my auction site.
I copied your thirdparty folder and connection2.js. I changed constant.php
I also ran server.php by going into directory
and running it from command shell by entering => php server.php
Everytime I try to send a message saying:

Connection2.js:7 WebSocket connection to 'ws://192.168.0.104:2000/' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT

Can you please take a look and tell me what am i doing wrong.

Server Side exampel

An example on creating the connection from the server would be a great addition

How to run server.php on cpanel?

First of all Many thanks for making this demo script for helping others like me to understand how we can use sockets.
I want to know how to run server.php on CPANEL??
I am using shared Hosting. Will it work on shared hosting also.??

How to get Chat app into CI_Controller

hi there, very interesting project !

I was thinking if it could be possible to somehow make your Chat.php class extend from CI_Controller ?
This would make a huge difference in terms of writing the chat server logic, one could insert data in the database directly from the socket server (using CI models and querybuilder classes... , among other things).

I tried extending from My_Controller but off course the application needs to fully integrate with the framework, I'm a bit puzzled if and how this could be accomplished... There might be security issues and of course the use of the session class could cause some unexpected behaviour, but still I think this could be worth taking a look at...

Excuse me if my question is not clear, basically I would be able to do this :

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

use Ratchet\MessageComponentInterface;
use Ratchet\ConnectionInterface;

class Chat extends MY_Controller implements MessageComponentInterface {

    public function __construct()
    {
        parent::__construct();
    }

    public function index()
    {
        // not used...
    }

    public function onOpen(ConnectionInterface $conn) {
    }

    public function onMessage(ConnectionInterface $from, $msg) {
    }

    public function onClose(ConnectionInterface $conn) {
    }

    public function onError(ConnectionInterface $conn, \Exception $e) {
    }

}

/* End of file Chat.php */
/* Location: ./application/controllers/Chat.php */```

Error of BROADCAST_URL

when i try to run command php server.php got following error the value of
BROADCAST_URL is set to a localhost ip that is 127.0.0.1 .
socket

WebSocket connection

Hi,
I have implemented your code but i am getting following error
WebSocket connection to 'ws://mydomain.com/' failed: Error during WebSocket handshake: Unexpected response code: 301

Connection Localhost

Hello,

I am having connection issue on localhost server i am using 8080 port and console is showing this error

WebSocket connection to 'ws://192.168.0.105:8080/' failed: Error during WebSocket handshake: Unexpected response code: 302

Thanks,

Messages retrieving Issue

Hello,

When i sent a message connectionMessage client side not working after refreshing sender page then its receiving real time on other computer.

Thanks,

How to use this project to serve the specific-user chatting

I have a website that should serve a student communication in our university, I found that this project is like a chat room, How can I convert it to another form where student can chat with a specific user using their ID ?? I so grateful for every help

Server.php problem in cpanel

I was able to run server.php in cpanel using cron, but i am getting this error

Fatal error: Uncaught exception 'React\Socket\ConnectionException' with message 'Could not bind to tcp://0.0.0.0:2000: Address already in use'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.