mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
11 lines
275 B
TypeScript
11 lines
275 B
TypeScript
/// <reference path="socket.io-client-0.9.d.ts"/>
|
|
|
|
var socket = io.connect('http://localhost:80');
|
|
|
|
socket.on('connect', function () {
|
|
console.log('Connected!');
|
|
socket.emit('event', 'some test data', function () {
|
|
console.log('Sent some data.');
|
|
});
|
|
});
|