Ultra fast and low latency asynchronous socket server & client C# .NET Core library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution
I am trying to use netCoreserver library to receive the high frequency NSE TBT multicast data . I have use multicast udp client sample code . But it is receiving same packet multiple time and giving exception stack over flow .
..................................................
Stack overflow.
at System.Text.OSEncoding.WideCharToMultiByte(Int32, Char, Int32, Byte, Int32)
at System.Text.OSEncoder.GetBytes(Char, Int32, Byte, Int32, Boolean)
at System.Text.Encoder.GetBytes(System.ReadOnlySpan1<Char>, System.Span1, Boolean)
at System.IO.StreamWriter.Flush(Boolean, Boolean)
at System.IO.StreamWriter.WriteLine(System.String)
at System.IO.TextWriter+SyncTextWriter.WriteLine(System.String)
at System.Console.WriteLine(System.String)
at NSEFO_TBT.Controller.MultiCastUDPReader.OnReceived(System.Net.EndPoint, Byte[], Int64, Int64)
at NetCoreServer.UdpClient.ProcessReceiveFrom(System.Net.Sockets.SocketAsyncEventArgs)
at NetCoreServer.UdpClient.TryReceive()
at NSEFO_TBT.Controller.MultiCastUDPReader.OnReceived(System.Net.EndPoint, Byte[], Int64, Int64)
at NetCoreServer.UdpClient.ProcessReceiveFrom(System.Net.Sockets.SocketAsyncEventArgs)
at NetCoreServer.UdpClient.TryReceive()
at NSEFO_TBT.Controller.MultiCastUDPReader.OnReceived(System.Net.EndPoint, Byte[], Int64, Int64)
at NetCoreServer.UdpClient.ProcessReceiveFrom(System.Net.Sockets.SocketAsyncEventArgs)
at NetCoreServer.UdpClient.TryReceive()
....................
Stack over flow error is solved it is calling from the OnReceived . It was going in infinte recursion loop so stack over flow error is throwing . But the same data receiving multiple time is still there .
Hi ,
I am trying to use netCoreserver library to receive the high frequency NSE TBT multicast data . I have use multicast udp client sample code . But it is receiving same packet multiple time and giving exception stack over flow .
.................................................. Stack overflow. at System.Text.OSEncoding.WideCharToMultiByte(Int32, Char, Int32, Byte, Int32) at System.Text.OSEncoder.GetBytes(Char, Int32, Byte, Int32, Boolean) at System.Text.Encoder.GetBytes(System.ReadOnlySpan, Boolean)
at System.IO.StreamWriter.Flush(Boolean, Boolean)
at System.IO.StreamWriter.WriteLine(System.String)
at System.IO.TextWriter+SyncTextWriter.WriteLine(System.String)
at System.Console.WriteLine(System.String)
at NSEFO_TBT.Controller.MultiCastUDPReader.OnReceived(System.Net.EndPoint, Byte[], Int64, Int64)
at NetCoreServer.UdpClient.ProcessReceiveFrom(System.Net.Sockets.SocketAsyncEventArgs)
at NetCoreServer.UdpClient.TryReceive()
at NSEFO_TBT.Controller.MultiCastUDPReader.OnReceived(System.Net.EndPoint, Byte[], Int64, Int64)
at NetCoreServer.UdpClient.ProcessReceiveFrom(System.Net.Sockets.SocketAsyncEventArgs)
at NetCoreServer.UdpClient.TryReceive()
at NSEFO_TBT.Controller.MultiCastUDPReader.OnReceived(System.Net.EndPoint, Byte[], Int64, Int64)
at NetCoreServer.UdpClient.ProcessReceiveFrom(System.Net.Sockets.SocketAsyncEventArgs)
at NetCoreServer.UdpClient.TryReceive()
....................
1<Char>, System.Span
1Please suggest what am i doing wrong here .