Skip to content

Commit

Permalink
Fixes for samples for new coder factory
Browse files Browse the repository at this point in the history
- Moved to 0.3.2
  • Loading branch information
alandoherty committed Dec 3, 2018
1 parent 483c589 commit 30d48a6
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion samples/Example.Chat/ChatConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Example.Chat
{
public class ChatConnection : ProtocolConnection<ChatConnection, ChatMessage>
{
public ChatConnection(ProtocolServer<ChatConnection, ChatMessage> server, IProtocolCoder<ChatMessage> coder) : base(server, coder) {
public ChatConnection(ProtocolServer<ChatConnection, ChatMessage> server, ProtocolCoderFactory<ChatMessage> coderFactory) : base(server, coderFactory) {
}
}
}
2 changes: 1 addition & 1 deletion samples/Example.Chat/ChatServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Example.Chat
{
public class ChatServer : ProtocolServer<ChatConnection, ChatMessage>
{
public ChatServer() : base(new ChatCoder()) {
public ChatServer() : base((p) => new ChatCoder()) {
}
}
}
2 changes: 1 addition & 1 deletion samples/Example.Minecraft/Net/ClassicConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Example.Minecraft.Net
{
public class ClassicConnection : ProtocolConnection<ClassicConnection, ClassicPacket>
{
public ClassicConnection(ProtocolServer<ClassicConnection, ClassicPacket> server, IProtocolCoder<ClassicPacket> coder) : base(server, coder) {
public ClassicConnection(ProtocolServer<ClassicConnection, ClassicPacket> server, ProtocolCoderFactory<ClassicPacket> coderFactory) : base(server, coderFactory) {

}
}
Expand Down
2 changes: 1 addition & 1 deletion samples/Example.Minecraft/Net/ClassicServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Example.Minecraft.Net
public class ClassicServer : ProtocolServer<ClassicConnection, ClassicPacket>
{
#region Constructors
public ClassicServer(Uri uri) : base (new ClassicCoder()) {
public ClassicServer(Uri uri) : base ((p) => new ClassicCoder()) {
Configure(uri);
}
#endregion
Expand Down
2 changes: 1 addition & 1 deletion src/ProtoSocket/ProtoSocket.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netstandard1.3</TargetFramework>
<Authors>Alan Doherty &amp; WIFIPLUG Ltd</Authors>
<Company>Alan Doherty</Company>
<Version>0.3.1</Version>
<Version>0.3.2</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Description>A networking library for frame-based, performant asynchronous sockets on .NET Core</Description>
<Copyright>Alan Doherty 2018</Copyright>
Expand Down
6 changes: 3 additions & 3 deletions src/ProtoSocket/ProtocolConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ IProtocolServer IProtocolConnection.Server {
/// Creates a new protocol connection with the provided coder.
/// </summary>
/// <param name="server">The server.</param>
/// <param name="coder">The coder.</param>
public ProtocolConnection(ProtocolServer<TConnection, TFrame> server, IProtocolCoder<TFrame> coder)
: base(coder) {
/// <param name="coderFactory">The coder factory.</param>
public ProtocolConnection(ProtocolServer<TConnection, TFrame> server, ProtocolCoderFactory<TFrame> coderFactory)
: base(coderFactory) {
_server = server;
}
#endregion
Expand Down

0 comments on commit 30d48a6

Please sign in to comment.