Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
Johnny Z
you can explicitly bind as ipv4 and see what happens
@Aaronontheweb According to your stacktrace , maybe ((AbstractSocketUnsafe)this.Unsafe).FinishConnect(eventPayload); should be called here instead, not tested. https://github.com/Azure/DotNetty/blob/6515aa085348fce0f1e4bc6b9ff7b41d34dfddf8/src/DotNetty.Transport/Channels/Sockets/TcpSocketChannel.cs#L131
The above message is wrong, FulfillConnectPromise can't be called twice. But the below one is still not tested on Linux.
        protected override bool DoConnect(EndPoint remoteAddress, EndPoint localAddress)
            if (localAddress != null)

            bool success = false;
                var eventPayload = new SocketChannelAsyncOperation(this, false);
                eventPayload.RemoteEndPoint = remoteAddress;
                bool connected = !this.Socket.ConnectAsync(eventPayload);
                success = true;//<-- Move the line before `DoFinishConnect` to avoid the really Exception be overwritten
                if (connected)
                return connected;
                if (!success)
@nayato Since new System.Net.Sockets.Socket(System.Net.Sockets.SocketType.Stream, System.Net.Sockets.ProtocolType.Tcp).Shutdown(System.Net.Sockets.SocketShutdown.Both); always throw,
should TcpSocketChannel.DoClose check StateFlags.Active first before call Socket.Shutdown()?
This can also be reproduce with
                var group = new MultithreadEventLoopGroup();
                var bootstrap = new Bootstrap()
                    .Handler(new ActionChannelInitializer<ISocketChannel>(_ => { }));

                var zz = await bootstrap.BindAsync(new IPEndPoint(IPAddress.Loopback, 0));
                await zz.CloseAsync();
Aaron Stannard
@StormHub that's been my experience too, but unless there was a regression introduced into the DNS resolution bits in .NET Core 2.1 I don't think that's the issue in this case, since .NET Core 2.0 runs fine
Hi All ! Is there Gitter channel for Azure Dev OPs ?
Hi All! In a method ChannelRead of a specific handler I must to wait the end of a method Async. If I use the Wait() the channel freezes and no longer resumes. Can I solve this problem?
Minu Francis
Hi.. I am completely new to DotNetty and I am trying to implement a server using it. I tried the sample EchoServer and everything works like a charm. But then, I have some custom logic to be done on receipt of a message - call an api (for instance) and the data returned by the api is to be send back to the client. I have written a decoder that inherits MessageToMessageDecoder and then the next handler is a business logic handler. My understanding was that when ChannelReadComplete is invoked, it should send the data back to client (With WriteAndFlushAsync). I tried overriding the ChannelReadComplete which has the call context.WriteAndFlushAsync(apiResponse) in my business logic handler. But even though the write and flush happens, I do not see the response in the Echo Client. Any help is greatly appreciated. As I am new to this, please correct me if any of my statements are incorrect. Thanks in advance.
James Drawneek
Does anyone know a good place to talk about Azure WAF?
Johnny Z
Alexandro Pequeno
Hi guys! anyone available?
hello guys, how are you, @StormHub is it possible to use WebSocket Sample to create a push server?
Johnny Z
@jdevillard Im using mqtt over web socket at the moment, its sorta 'push'
@StormHub ok, thanks you. I've to implement the backend now, I think the idea is to store the IChannelHandlerContext after the handshake to be able to push data to client later, and be able to remove the ctx when a connection is close ?
another question : WebSocket is full duplex, so once the connection is made, Client can send and receive data at the same time ?
Hello, @StormHub , I'm playing with the WebSocket SAmple and a lot of time I've got an error at this code :
case StInit:
                        throw new InvalidOperationException($"unexpected message type: {StringUtil.SimpleClassName(message)}");
at DotNetty.Codecs.Http.HttpObjectEncoder.cs , line 81
i don't understand why, because without any change (just relaunch the debugger instance) it work the time after... Any idea? Maybe I'm doing something wrong but I don't understand why my F5 run the next time.
Has anyone been able to deploy the WebSocket sample to an Azure instance? I was able to do it after targeting only one framework, but I can't connect to it.
You have to change this line IChannel bootstrapChannel = await bootstrap.BindAsync(IPAddress.Loopback, port);
ipaddress.loopback restrict to localhost, so you are not bind to public ip
@avger use IPAddress.All
And check also the inbound security rule of your instance
Nouras Hamwi
hello everyone, I have a problem connecting to a consumer (server) using netty in apache camel, it works fine when I connect to using openssl I also have no issues connecting from netty to any other openssl consumer, but when it comes to this device I get a no response error. Any idea what could be interupting the tcp connection because a handshake ?
Mirza Tazeem Baig
How can we access files from blob storage in microsoft azure
Josef Grieb
Hi everyone, I have an problem to add dotnetty dll to Unity. Error Message: "Assembly 'Assets/DotNetty.Common.dll' will not be loaded due to errors:
Unable to resolve reference 'Microsoft.Extensions.Logging.Abstractions'. Is the assembly missing or incompatible with the current platform?" Any idea? (I'm using a Mac)
Alexander Gnauck
@1Jo1 DotNetty.Common depends on Microsoft.Extensions.Logging. Have you added the reference over NuGet? Is should resolve all your dependencies automatically. But I don't know much about Unity :smirk:
Josef Grieb
@agnauck it is working now. Thank you for help. Basically I added 6 dll over nuget

Hi guys how you all doing. Im trying to build something with Dotnetty and facing an error I hope you can help with. My application needs to two sockets, out main public socket then a rpc socket. Im able to initialize and start the service being our main socket. but when I start my rpc socket and connect via the client dotnetty errors out with this error

DotNetty.Transport.Channels.ChannelPipelineException: ProtobufVarint32FrameDecoder is not a @Sharable handler, so can't be added or removed multiple times. at DotNetty.Transport.Channels.DefaultChannelPipeline.CheckMultiplicity(IChannelHandler handler) at DotNetty.Transport.Channels.DefaultChannelPipeline.AddLast(IEventExecutorGroup group, String name, IChannelHandler handler) at DotNetty.Transport.Channels.DefaultChannelPipeline.AddLast(IEventExecutorGroup group, IChannelHandler[] handlers) at Catalyst.Node.Common.Helpers.IO.Inbound.InboundChannelInitializer`1.InitChannel(T channel) in /App/Helpers/IO/Inbound/InboundChannelInitializer.cs:line 53 at DotNetty.Transport.Channels.ChannelInitializer`1.InitChannel(IChannelHandlerContext ctx)

I have initialized both sockets/ channel initialize / handlers /encoder/decodes with new each time as to not share the object
both have new threads
Boris Lange
Hi guys, I am right now working on a PoC for a server-agents infrastructure. What i wanted to realize with dotnetty is simple: sending POCO messages in a fire and forget fashion and sending/receiving in a request-response fashion. as i have some experience with protobuf i thought that was the right thing for me to use. I looked through the examples in the repo, but i am unsure, which of the described examples fits my needs so i can adapt and learn through them. I have played with the echo and the discard server examples. but i have no clue what is my responsibility when it comes to sending/receiving objects. do i have to write my own decoder? are there generic protobuf decoders that accept proto files? Do you have a guidance for me? Or are there sources with better fitting samples for my use case? I have a very basic level of tcp socket io knowledge tbh
Artyom M.
Is the official repo abandoned? Haven't saw any new commits in a while and pull requests just hanging
Hi all, I am using VS 2019 to design my data models using .efmodel data file. When I tried to open that file it is throwing error
Has anyone expericed it ?
does dotnetty support .net4.0?
Maxel Schultz
I've got an application running which allows you to start many bootstraps to allow udp sockets opened across multiple ports, each with their own handler. I am testing out with about 20 udp bootstraps open, and I'm testing sending messages. occasionally it seems like a packet will come in (which I'm monitoring usign tcpdump on an ubuntu server) but it is not being logged from my program
I assume the io thread or some other blocking code is causing an issue with inconsistency, but I'm curious if anything I've described sounds egregiously wrong
and by extension, I'm not sure the best way to debug the issue. if I enable fine+ level logging, I would imagine I will only exacerbate the problem
Maxel Schultz
is DotNetty support finished from Azure?
Иван Сердюк
Hello, community
I have few questions
could you propose some use cases/adoption workflows for using DotNetty from/with: