This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body> | |
<button id = "micButton">Mic</button> | |
<audio id = "localAudio" ></audio> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string, random, subprocess, traceback | |
class UnSuccesfulCommandExecution(Exception): | |
pass | |
class Playlist: | |
playlist = list() | |
urls = list() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var WebSocketServer = require('websocket').server; | |
var http = require('http'); | |
var server = http.createServer(function(request, response) { | |
console.log((new Date()) + ' Received request for ' + request.url); | |
response.writeHead(404); | |
response.end(); | |
}); | |
server.listen(5050, function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var fs = require('fs'); | |
var server = http.createServer( function (request, response) { | |
response.writeHead(200, { | |
'Content-Type':'text/html', | |
}); | |
fs.readFile('./templates/client.html', null, function(error, data) { | |
if (error){ | |
response.writeHead(404); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Web Socket Messenger.</title> | |
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css" integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous"> | |
<style> | |
.message_board{ | |
border: solid 1px; | |
width: 500px; | |
margin:auto; | |
padding:5px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var WSclient = require('websocket').client; | |
var client = new WSclient(); | |
client.on('connectionFailed', function(error) { | |
console.log('Connection Error: '+error.toString()); | |
}); | |
client.on('connect', function(connection) { | |
console.log('Connected'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var WebSocketServer = require('websocket').server; | |
var http = require('http'); //for http | |
var server = http.createServer(function(request, response) { | |
console.log((new Date()) + ' Received request for ' + request.url); | |
response.writeHead(404); | |
response.end(); | |
}); //This http server responds 404 for all the http requests. | |
server.listen(8080, function() { |