Skip to content

Commit

Permalink
fix udp bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-heinz committed Feb 6, 2020
1 parent 4fb5bbd commit 2051990
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions Arrowgene.Services/Networking/Udp/UdpSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,19 @@ public class UdpSocket
/// <summary>
/// Creates a new instance of <see cref="UdpSocket"/>
/// </summary>
public UdpSocket()
public UdpSocket() : this (DefaultMaxPayloadSizeBytes)
{
}

public UdpSocket(int maxPayloadSizeBytes)
{
MaxPayloadSizeBytes = maxPayloadSizeBytes;
_isBound = false;
_receive = false;
_buffer = new byte[MaxPayloadSizeBytes];
_socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
MaxPayloadSizeBytes = DefaultMaxPayloadSizeBytes;
}

/// <summary>
/// Occurs when data is received
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion services.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.13.3
1.13.4

0 comments on commit 2051990

Please sign in to comment.