mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-06-27 16:10:34 +08:00
Socket connectivity up and running
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
window.GarageServerIO = (function (socketio) {
|
||||
|
||||
this.io = socketio;
|
||||
var io = socketio,
|
||||
|
||||
var connectGarageServer = function (path) {
|
||||
this.io.connect(path + '/garageserver');
|
||||
connectToGarageServer = function (path) {
|
||||
io.connect(path + '/garageserver');
|
||||
};
|
||||
|
||||
return {
|
||||
connectGarageServer: connectGarageServer
|
||||
connectToGarageServer: connectToGarageServer
|
||||
};
|
||||
|
||||
}) (io);
|
||||
@@ -0,0 +1,5 @@
|
||||
$(function () {
|
||||
|
||||
GarageServerIO.connectGarageServer('http://garageserver_io.jbillmann.c9.io/garageserver.io');
|
||||
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
@@ -5,5 +5,7 @@ html
|
||||
link(rel='stylesheet', href='/stylesheets/style.css')
|
||||
script(src='/socket.io/socket.io.js')
|
||||
script(src='/garageserver.io.js')
|
||||
script(src='/javascripts/jquery-2.0.0.min.js')
|
||||
script(src='/javascripts/game.js')
|
||||
body
|
||||
block content
|
||||
Reference in New Issue
Block a user