Refactor server socket management for Linux support.

This commit is contained in:
Christian Kratky
2018-06-09 15:31:47 +02:00
parent 9e318fc40d
commit e62316105f
24 changed files with 229 additions and 185 deletions
@@ -13,7 +13,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Frameworks\MQTTnet.NetStandard\MQTTnet.NetStandard.csproj" />
<ProjectReference Include="..\..\Frameworks\MQTTnet.NetStandard\MQTTnet.csproj" />
</ItemGroup>
</Project>
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Pipelines;
using System.Net;
@@ -21,7 +20,7 @@ namespace MQTTnet.Benchmarks.Tcp
public TcpConnection(EndPoint endPoint)
{
_socket = new Socket(SocketType.Stream, ProtocolType.Tcp);
_socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
_endPoint = endPoint;
_sender = new SocketSender(_socket, PipeScheduler.ThreadPool);