Skip to content

Commit 069c2da

Browse files
Christoph BauerChristoph Bauer
authored andcommitted
Nuget Update
1 parent c953ae8 commit 069c2da

File tree

5 files changed

+54
-56
lines changed

5 files changed

+54
-56
lines changed

src/NetMQ.Tests/NetMQ.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
4444
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.6.3" />
4545
<PackageReference Include="xunit" Version="2.9.3" />
46-
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
46+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.1">
4747
<PrivateAssets>all</PrivateAssets>
4848
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4949
</PackageReference>

src/NetMQ/Core/Transports/Tcp/TcpListener.cs

Lines changed: 49 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ internal class TcpListener : Own, IProactorEvents
4545
/// </summary>
4646
private AsyncSocket? m_handle;
4747

48-
/*
49-
/// <summary>
50-
/// socket being accepted
51-
/// </summary>
52-
private AsyncSocket m_acceptedSocket;
53-
*/
48+
/*
49+
/// <summary>
50+
/// socket being accepted
51+
/// </summary>
52+
private AsyncSocket m_acceptedSocket;
53+
*/
5454

5555
/// <summary>
5656
/// Socket the listener belongs to.
@@ -107,7 +107,7 @@ protected override void ProcessPlug()
107107
protected override void ProcessTerm(int linger)
108108
{
109109
Assumes.NotNull(m_handle);
110-
110+
111111
m_ioObject.SetHandler(this);
112112
m_ioObject.RemoveSocket(m_handle);
113113
Close();
@@ -123,7 +123,7 @@ public virtual void SetAddress(string addr)
123123
m_address.Resolve(addr, m_options.IPv4Only);
124124

125125
Assumes.NotNull(m_address.Address);
126-
126+
127127

128128
try
129129
{
@@ -195,75 +195,74 @@ public void InCompleted(SocketError socketError, int bytesTransferred)
195195
switch (socketError)
196196
{
197197
case SocketError.Success:
198-
{
199-
// TODO: check TcpFilters
200-
var acceptedSocket = m_handle.GetAcceptedSocket();
198+
{
199+
// TODO: check TcpFilters
200+
var acceptedSocket = m_handle.GetAcceptedSocket();
201201

202202
acceptedSocket.NoDelay = true;
203203

204-
if (m_options.TcpKeepalive != -1)
205-
{
206-
acceptedSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, m_options.TcpKeepalive);
204+
if (m_options.TcpKeepalive != -1)
205+
{
206+
acceptedSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, m_options.TcpKeepalive);
207207

208-
if (m_options.TcpKeepaliveIdle != -1 && m_options.TcpKeepaliveIntvl != -1)
209-
{
210-
var bytes = new ByteArraySegment(new byte[12]);
208+
if (m_options.TcpKeepaliveIdle != -1 && m_options.TcpKeepaliveIntvl != -1)
209+
{
210+
var bytes = new ByteArraySegment(new byte[12]);
211211

212-
Endianness endian = BitConverter.IsLittleEndian ? Endianness.Little : Endianness.Big;
212+
Endianness endian = BitConverter.IsLittleEndian ? Endianness.Little : Endianness.Big;
213213

214-
bytes.PutInteger(endian, m_options.TcpKeepalive, 0);
215-
bytes.PutInteger(endian, m_options.TcpKeepaliveIdle, 4);
216-
bytes.PutInteger(endian, m_options.TcpKeepaliveIntvl, 8);
214+
bytes.PutInteger(endian, m_options.TcpKeepalive, 0);
215+
bytes.PutInteger(endian, m_options.TcpKeepaliveIdle, 4);
216+
bytes.PutInteger(endian, m_options.TcpKeepaliveIntvl, 8);
217217
#if NET
218218
if (!OperatingSystem.IsWindows())
219219
{
220220
throw new InvalidOperationException("Not supported on you platform"); // There is a pull request for .net8.0
221221

222222
}
223223
#endif
224-
acceptedSocket.IOControl(IOControlCode.KeepAliveValues, (byte[])bytes, null);
225-
226-
}
224+
acceptedSocket.IOControl(IOControlCode.KeepAliveValues, (byte[])bytes, null);
227225
}
226+
}
228227

229-
// Create the engine object for this connection.
230-
var engine = new StreamEngine(acceptedSocket, m_options, m_endpoint);
228+
// Create the engine object for this connection.
229+
var engine = new StreamEngine(acceptedSocket, m_options, m_endpoint);
231230

232-
// Choose I/O thread to run connector in. Given that we are already
233-
// running in an I/O thread, there must be at least one available.
234-
IOThread? ioThread = ChooseIOThread(m_options.Affinity);
231+
// Choose I/O thread to run connector in. Given that we are already
232+
// running in an I/O thread, there must be at least one available.
233+
IOThread? ioThread = ChooseIOThread(m_options.Affinity);
235234

236-
Assumes.NotNull(ioThread);
235+
Assumes.NotNull(ioThread);
237236

238-
// Create and launch a session object.
239-
// TODO: send null in address parameter, is unneeded in this case
240-
SessionBase session = SessionBase.Create(ioThread, false, m_socket, m_options, new Address(m_handle.LocalEndPoint));
241-
session.IncSeqnum();
242-
LaunchChild(session);
237+
// Create and launch a session object.
238+
// TODO: send null in address parameter, is unneeded in this case
239+
SessionBase session = SessionBase.Create(ioThread, false, m_socket, m_options, new Address(m_handle.LocalEndPoint));
240+
session.IncSeqnum();
241+
LaunchChild(session);
243242

244-
SendAttach(session, engine, false);
243+
SendAttach(session, engine, false);
245244

246-
m_socket.EventAccepted(m_endpoint, acceptedSocket);
245+
m_socket.EventAccepted(m_endpoint, acceptedSocket);
247246

248-
Accept();
249-
break;
250-
}
247+
Accept();
248+
break;
249+
}
251250
case SocketError.ConnectionReset:
252251
case SocketError.NoBufferSpaceAvailable:
253252
case SocketError.TooManyOpenSockets:
254-
{
255-
m_socket.EventAcceptFailed(m_endpoint, socketError.ToErrorCode());
253+
{
254+
m_socket.EventAcceptFailed(m_endpoint, socketError.ToErrorCode());
256255

257-
Accept();
258-
break;
259-
}
256+
Accept();
257+
break;
258+
}
260259
default:
261-
{
262-
NetMQException exception = NetMQException.Create(socketError);
260+
{
261+
NetMQException exception = NetMQException.Create(socketError);
263262

264-
m_socket.EventAcceptFailed(m_endpoint, exception.ErrorCode);
265-
throw exception;
266-
}
263+
m_socket.EventAcceptFailed(m_endpoint, exception.ErrorCode);
264+
throw exception;
265+
}
267266
}
268267
}
269268

src/NetMQ/NetMQException.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ public class NetMQException : Exception
2525
/// Create NetMQ Exception
2626
/// </summary>
2727
public NetMQException()
28-
{ }
28+
{}
2929

3030
/// <summary>
3131
/// Create a new NetMQ exception
3232
/// </summary>
3333
/// <param name="message"></param>
3434
public NetMQException(string message)
3535
: base(message)
36-
{ }
36+
{}
3737

3838
/// <summary>
3939
/// Create a new NetMQ exception
@@ -42,7 +42,7 @@ public NetMQException(string message)
4242
/// <param name="innerException"></param>
4343
public NetMQException(string message, Exception innerException)
4444
: base(message, innerException)
45-
{ }
45+
{}
4646

4747
/// <summary>Constructor for serialisation.</summary>
4848
protected NetMQException(SerializationInfo info, StreamingContext context)

src/NetMQ/NetMQPoller.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ private void RunPoller()
641641

642642
#if !NET35
643643
// Try to dequeue and execute all pending tasks before stopping poller
644-
while (m_tasksQueue.TryDequeue(out Task? task, TimeSpan.Zero) )
644+
while (m_tasksQueue.TryDequeue(out Task? task, TimeSpan.Zero))
645645
TryExecuteTask(task!);
646646
#endif
647647
}

src/NetMQ/NetMQQueue.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ public bool TryDequeue(out T? result, TimeSpan timeout)
117117

118118
m_queue.TryDequeue(out T? result);
119119

120-
121120
return result;
122121
}
123122

0 commit comments

Comments
 (0)