Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Commit

Permalink
Renaming RpcConnection to HubConnection
Browse files Browse the repository at this point in the history
  • Loading branch information
moozzyk committed Nov 30, 2016
1 parent 4158dfe commit e6b34fd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ runtimes/
.testPublish/
launchSettings.json
node_modules/
npm-debug.log
*.tmp
*.nuget.props
*.nuget.targets
Expand Down
2 changes: 1 addition & 1 deletion samples/ChatSample/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</div>
<script src="lib/signalr-client/signalr-client.js"></script>
<script>
let connection = new signalR.RpcConnection(`http://${document.location.host}/chat`, 'formatType=json&format=text');
let connection = new signalR.HubConnection(`http://${document.location.host}/chat`, 'formatType=json&format=text');
connection.on('Send', function (message) {
var child = document.createElement('li');
Expand Down
2 changes: 1 addition & 1 deletion samples/SocketsSample/wwwroot/hubs.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ <h4>Private Message</h4>

document.getElementById('head1').innerHTML = transport;

let connection = new signalR.RpcConnection(`http://${document.location.host}/hubs`, 'formatType=json&format=text');
let connection = new signalR.HubConnection(`http://${document.location.host}/hubs`, 'formatType=json&format=text');
connection.on('Send', msg => {
addLine(msg);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface InvocationResultDescriptor {
readonly Result: any;
}

export class RpcConnection {
export class HubConnection {
private connection: Connection;
private callbacks: Map<string, (any) => void>;
private methods: Map<string, (...args:any[]) => void>;
Expand All @@ -21,9 +21,9 @@ export class RpcConnection {
constructor(url: string, queryString?: string) {
this.connection = new Connection(url, queryString);

let thisRpcConnection = this;
let thisHubConnection = this;
this.connection.dataReceived = data => {
thisRpcConnection.dataReceived(data);
thisHubConnection.dataReceived(data);
};

this.callbacks = new Map<string, (any) => void>();
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.AspNetCore.SignalR.Client.TS/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ gulp.task('compile-ts-client', () => {
});

gulp.task('browserify-client', ['compile-ts-client'], () => {
return browserify(clientOutDir + '/RpcConnection.js', {standalone: 'signalR'})
return browserify(clientOutDir + '/HubConnection.js', {standalone: 'signalR'})
.bundle()
.pipe(source('signalr-client.js'))
.pipe(gulp.dest(clientOutDir + '/../signalr-client-bundle'));
Expand Down

0 comments on commit e6b34fd

Please sign in to comment.