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> | |
<head> | |
<title>SignalR MoveShape Demo</title> | |
<style> | |
#shape { | |
width: 100px; | |
height: 100px; | |
background-color: #FF0000; |
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> | |
<head> | |
<title>SignalR MoveShape Demo</title> | |
<style> | |
#shape { | |
width: 100px; | |
height: 100px; | |
background-color: #FF0000; |
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
using System; | |
using System.Threading; | |
using Microsoft.AspNet.SignalR; | |
namespace MoveShape | |
{ | |
public class MoveShapeHub : Hub | |
{ | |
// Broadcast 50 times per second | |
private static readonly TimeSpan BroadcastInterval = TimeSpan.FromMilliseconds(20); |
NewerOlder