Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent spelling of "Signalling" #14

Merged
merged 1 commit into from
Oct 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public IAsyncOperation<bool> DisconnectAsync()
return true;
}

// Disconnect our connection with the Signalling Server.
// Disconnect our connection with the Signaling Server.
// The server will automatically recognize that the client
// is not registered anymore, once it missed the next two heartbeats.
await _signalingSocketChannel.DisconnectSignalingServerAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public IAsyncOperation<ConnectionStatus> ConnectToSignalingServerAsync(Connectio
}
catch (Exception exception)
{
Debug.WriteLine("Failed to connect to signalling server: ex: " + exception.Message);
Debug.WriteLine("Failed to connect to signaling server: ex: " + exception.Message);
return new ConnectionStatus
{
IsConnected = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Signalling\Peer.cs" />
<Compile Include="Signaling\Peer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Signalling\Signaler.cs" />
<Compile Include="Signalling\TcpSignaler.cs" />
<Compile Include="Signalling\Util.cs" />
<Compile Include="Signaling\Signaler.cs" />
<Compile Include="Signaling\TcpSignaler.cs" />
<Compile Include="Signaling\Util.cs" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
Expand Down
2 changes: 1 addition & 1 deletion Samples/DataChannelOrtc/DataChannelOrtc/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using DataChannelOrtc.Signalling;
using DataChannelOrtc.Signaling;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Text;
using System.Threading.Tasks;

namespace DataChannelOrtc.Signalling
namespace DataChannelOrtc.Signaling
{
public class Peer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Text;
using System.Threading.Tasks;

namespace DataChannelOrtc.Signalling
namespace DataChannelOrtc.Signaling
{
abstract class Signaler
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
using Windows.Networking.Sockets;
using Windows.Storage.Streams;

namespace DataChannelOrtc.Signalling
namespace DataChannelOrtc.Signaling
{
/// <summary>
/// Signaller instance is used to fire connection events.
/// Signaler instance is used to fire connection events.
/// </summary>
class TcpSignaler : Signaler
{
Expand All @@ -37,7 +37,7 @@ class TcpSignaler : Signaler
private StreamSocket _hangingGetSocket;

/// <summary>
/// Creates an instance of a Signaller.
/// Creates an instance of a Signaler.
/// </summary>
public TcpSignaler(string server, string port, string clientName)
{
Expand Down Expand Up @@ -275,7 +275,7 @@ private bool ParseServerResponse(string buffer, out int peer_id, out int eoh)
{
Debug.WriteLine("Peer most likely gone. Closing peer connection.");
//As Peer Id doesn't exist in buffer using 0
OnPeerDisconnected(new Signalling.Peer(0, string.Empty));
OnPeerDisconnected(new Signaling.Peer(0, string.Empty));
return false;
}
Close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Windows.Networking.Sockets;
using Windows.Storage.Streams;

namespace DataChannelOrtc.Signalling
namespace DataChannelOrtc.Signaling
{
/// <summary>
/// The connection state.
Expand Down
4 changes: 2 additions & 2 deletions Samples/PeerCC-Sample/PeerConnectionClient.WebRtc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@
<Compile Include="Model\Peer.cs" />
<Compile Include="MVVM\BindableBase.cs" />
<Compile Include="MVVM\DispatcherBindableBase.cs" />
<Compile Include="Signalling\Conductor.cs" />
<Compile Include="Signalling\Signalling.cs" />
<Compile Include="Signaling\Conductor.cs" />
<Compile Include="Signaling\Signaling.cs" />
<Compile Include="Utilities\ActionCommand.cs" />
<Compile Include="Utilities\AppPerf.cs" />
<Compile Include="Utilities\BoolToVisConverter.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
using PeerConnectionClient.Utilities;
#endif

namespace PeerConnectionClient.Signalling
namespace PeerConnectionClient.Signaling
{
/// <summary>
/// A singleton conductor for WebRTC session.
Expand Down Expand Up @@ -69,13 +69,13 @@ public static Conductor Instance
}
}

private readonly Signaller _signaller;
private readonly Signaler _signaler;

/// <summary>
/// The signaller property.
/// The signaler property.
/// Helps to pass WebRTC session signals between client and server.
/// </summary>
public Signaller Signaller => _signaller;
public Signaler Signaler => _signaler;

/// <summary>
/// Video codec used in WebRTC session.
Expand Down Expand Up @@ -448,25 +448,25 @@ private Conductor()
//#else
//_signalingMode = RTCPeerConnectionSignalingMode.Sdp;
#endif
_signaller = new Signaller();
_signaler = new Signaler();
_media = Media.CreateMedia();

Signaller.OnDisconnected += Signaller_OnDisconnected;
Signaller.OnMessageFromPeer += Signaller_OnMessageFromPeer;
Signaller.OnPeerConnected += Signaller_OnPeerConnected;
Signaller.OnPeerHangup += Signaller_OnPeerHangup;
Signaller.OnPeerDisconnected += Signaller_OnPeerDisconnected;
Signaller.OnServerConnectionFailure += Signaller_OnServerConnectionFailure;
Signaller.OnSignedIn += Signaller_OnSignedIn;
Signaler.OnDisconnected += Signaler_OnDisconnected;
Signaler.OnMessageFromPeer += Signaler_OnMessageFromPeer;
Signaler.OnPeerConnected += Signaler_OnPeerConnected;
Signaler.OnPeerHangup += Signaler_OnPeerHangup;
Signaler.OnPeerDisconnected += Signaler_OnPeerDisconnected;
Signaler.OnServerConnectionFailure += Signaler_OnServerConnectionFailure;
Signaler.OnSignedIn += Signaler_OnSignedIn;

_iceServers = new List<RTCIceServer>();
}

/// <summary>
/// Handler for Signaller's OnPeerHangup event.
/// Handler for Signaler's OnPeerHangup event.
/// </summary>
/// <param name="peerId">ID of the peer to hung up the call with.</param>
void Signaller_OnPeerHangup(int peerId)
void Signaler_OnPeerHangup(int peerId)
{
if (peerId != _peerId) return;

Expand All @@ -475,25 +475,25 @@ void Signaller_OnPeerHangup(int peerId)
}

/// <summary>
/// Handler for Signaller's OnSignedIn event.
/// Handler for Signaler's OnSignedIn event.
/// </summary>
private void Signaller_OnSignedIn()
private void Signaler_OnSignedIn()
{
}

/// <summary>
/// Handler for Signaller's OnServerConnectionFailure event.
/// Handler for Signaler's OnServerConnectionFailure event.
/// </summary>
private void Signaller_OnServerConnectionFailure()
private void Signaler_OnServerConnectionFailure()
{
Debug.WriteLine("[Error]: Connection to server failed!");
}

/// <summary>
/// Handler for Signaller's OnPeerDisconnected event.
/// Handler for Signaler's OnPeerDisconnected event.
/// </summary>
/// <param name="peerId">ID of disconnected peer.</param>
private void Signaller_OnPeerDisconnected(int peerId)
private void Signaler_OnPeerDisconnected(int peerId)
{
// is the same peer or peer_id does not exist (0) in case of 500 Error
if (peerId != _peerId && peerId != 0) return;
Expand All @@ -503,20 +503,20 @@ private void Signaller_OnPeerDisconnected(int peerId)
}

/// <summary>
/// Handler for Signaller's OnPeerConnected event.
/// Handler for Signaler's OnPeerConnected event.
/// </summary>
/// <param name="id">ID of the connected peer.</param>
/// <param name="name">Name of the connected peer.</param>
private void Signaller_OnPeerConnected(int id, string name)
private void Signaler_OnPeerConnected(int id, string name)
{
}

/// <summary>
/// Handler for Signaller's OnMessageFromPeer event.
/// Handler for Signaler's OnMessageFromPeer event.
/// </summary>
/// <param name="peerId">ID of the peer.</param>
/// <param name="message">Message from the peer.</param>
private void Signaller_OnMessageFromPeer(int peerId, string message)
private void Signaler_OnMessageFromPeer(int peerId, string message)
{
Task.Run(async () =>
{
Expand Down Expand Up @@ -567,7 +567,7 @@ private void Signaller_OnMessageFromPeer(int peerId, string message)
if (!connectResult)
{
Debug.WriteLine("[Error] Conductor: Failed to initialize our PeerConnection instance");
await Signaller.SignOut();
await Signaler.SignOut();
return;
}
else if (_peerId != peerId)
Expand Down Expand Up @@ -695,9 +695,9 @@ private void Signaller_OnMessageFromPeer(int peerId, string message)
}

/// <summary>
/// Handler for Signaller's OnDisconnected event handler.
/// Handler for Signaler's OnDisconnected event handler.
/// </summary>
private void Signaller_OnDisconnected()
private void Signaler_OnDisconnected()
{
ClosePeerConnection();
}
Expand All @@ -709,21 +709,21 @@ private void Signaller_OnDisconnected()
/// <param name="port">The port to connect to.</param>
public void StartLogin(string server, string port)
{
if (_signaller.IsConnected())
if (_signaler.IsConnected())
{
return;
}
_signaller.Connect(server, port, GetLocalPeerName());
_signaler.Connect(server, port, GetLocalPeerName());
}

/// <summary>
/// Calls to disconnect the user from the server.
/// </summary>
public async Task DisconnectFromServer()
{
if (_signaller.IsConnected())
if (_signaler.IsConnected())
{
await _signaller.SignOut();
await _signaler.SignOut();
}
}

Expand Down Expand Up @@ -856,15 +856,15 @@ private void SendSdp(RTCSessionDescription description)
private void SendMessage(IJsonValue json)
{
// Don't await, send it async.
var task = _signaller.SendToPeer(_peerId, json);
var task = _signaler.SendToPeer(_peerId, json);
}

/// <summary>
/// Helper method to send a hangup message to a peer.
/// </summary>
private async Task SendHangupMessage()
{
await _signaller.SendToPeer(_peerId, "BYE");
await _signaler.SendToPeer(_peerId, "BYE");
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
using Windows.Networking.Sockets;
using Windows.Storage.Streams;

namespace PeerConnectionClient.Signalling
namespace PeerConnectionClient.Signaling
{
public delegate void SignedInDelegate();
public delegate void DisconnectedDelegate();
Expand All @@ -31,9 +31,9 @@ namespace PeerConnectionClient.Signalling
public delegate void ServerConnectionFailureDelegate();

/// <summary>
/// Signaller instance is used to fire connection events.
/// Signaler instance is used to fire connection events.
/// </summary>
class Signaller
class Signaler
{
// Connection events
public event SignedInDelegate OnSignedIn;
Expand All @@ -45,9 +45,9 @@ class Signaller
public event ServerConnectionFailureDelegate OnServerConnectionFailure;

/// <summary>
/// Creates an instance of a Signaller.
/// Creates an instance of a Signaler.
/// </summary>
public Signaller()
public Signaler()
{
_state = State.NOT_CONNECTED;
_myId = -1;
Expand Down
12 changes: 6 additions & 6 deletions Samples/PeerCC-Sample/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
using Microsoft.HockeyApp;
using PeerConnectionClient.Model;
using PeerConnectionClient.MVVM;
using PeerConnectionClient.Signalling;
using PeerConnectionClient.Signaling;
using PeerConnectionClient.Utilities;
#if ORTCLIB
using Org.Ortc;
Expand Down Expand Up @@ -297,7 +297,7 @@ public void Initialize(CoreDispatcher uiDispatcher)
};

// A Peer is connected to the server event handler
Conductor.Instance.Signaller.OnPeerConnected += (peerId, peerName) =>
Conductor.Instance.Signaler.OnPeerConnected += (peerId, peerName) =>
{
RunOnUiThread(() =>
{
Expand All @@ -311,7 +311,7 @@ public void Initialize(CoreDispatcher uiDispatcher)
};

// A Peer is disconnected from the server event handler
Conductor.Instance.Signaller.OnPeerDisconnected += peerId =>
Conductor.Instance.Signaler.OnPeerDisconnected += peerId =>
{
RunOnUiThread(() =>
{
Expand All @@ -322,7 +322,7 @@ public void Initialize(CoreDispatcher uiDispatcher)
};

// The user is Signed in to the server event handler
Conductor.Instance.Signaller.OnSignedIn += () =>
Conductor.Instance.Signaler.OnSignedIn += () =>
{
RunOnUiThread(() =>
{
Expand All @@ -334,7 +334,7 @@ public void Initialize(CoreDispatcher uiDispatcher)
};

// Failed to connect to the server event handler
Conductor.Instance.Signaller.OnServerConnectionFailure += () =>
Conductor.Instance.Signaler.OnServerConnectionFailure += () =>
{
RunOnUiThread(async () =>
{
Expand All @@ -345,7 +345,7 @@ public void Initialize(CoreDispatcher uiDispatcher)
};

// The current user is disconnected from the server event handler
Conductor.Instance.Signaller.OnDisconnected += () =>
Conductor.Instance.Signaler.OnDisconnected += () =>
{
RunOnUiThread(() =>
{
Expand Down