Giter Site home page Giter Site logo

nuperstar / chatchat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from taoistking/chatchat

0.0 0.0 0.0 189 KB

A simple chat system, supports text/voice/video chat, including a native iOS WebRTC client and a signaling system based on socket.io & Node.js

License: MIT License

JavaScript 14.72% Ruby 0.18% Objective-C 79.32% CSS 1.39% HTML 4.39%

chatchat's Introduction

Chatchat

A simple chat system demostrating how to build chat applications based on WebRTC, socket.io & Node.js

This system including a web server, a web client, and an iOS client, supports realtime text/voice/video chat.

The iOS client supports voip socket mode which means it could receive message even in background

Note: Since voip mode is deprecated from iOS 10, so you can no longer receive messages from background anymore. Refer here.

About WebRTC

WebRTC is an open framework for the web that enables Real Time Communications in the browser. It includes the fundamental building blocks for high-quality communications on the web, such as network, audio and video components used in voice and video chat applications.

Home page : https://webrtc.org/

Source : https://chromium.googlesource.com/external/webrtc

About Socket.io

Socket.IO is a JavaScript library for realtime web applications. It enables realtime, bi-directional communication between web clients and servers. It has two parts: a client-side library that runs in the browser, and a server-side library for node.js. Both components have a nearly identical API. Like node.js, it is event-driven.

Socket.IO primarily uses the WebSocket protocol with polling as a fallback option, while providing the same interface. Although it can be used as simply a wrapper for WebSocket, it provides many more features, including broadcasting to multiple sockets, storing data associated with each client, and asynchronous I/O.

Home page : http://socket.io/

Socket.io webserver : https://github.com/socketio/socket.io

Socket.io swift client : https://github.com/socketio/socket.io-client-swift

Deploy steps

Create SSL keys

First, You need to create your own SSL keys for your https server.

cd Server/public/key
openssl genrsa 1024 > private.pem
openssl req -new -key private.pem -out csr.pem
openssl x509 -req -days 365 -in csr.pem -signkey private.pem -out file.crt

Run your server

Make sure Node is installed first, then open your terminal

cd Server
npm install
node server.js

Run your web client

  • open localhost:3001 on your browser(prefer Chrome or Firefox)
  • ignore the secure warning and proceed
  • type in your nickname and submit

Run your iOS client

  • install dependency with pod install
  • open xcworkspace file
  • build and run
  • upon application launch, type in your host address(server address you are running on)
  • choose anyone online and start video chat

Enjoy chating! ๐Ÿ˜„

chatchat's People

Contributors

wangruihit avatar taoistking avatar xy2z avatar

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.