Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Ghost
@ghost~5e9b5b00d73408ce4fe0ea52
Dotnetty dead???
Alexander Gnauck
@agnauck
@pindumb0_twitter looks like :( would be great if the original maintainers could give an update on GitHub, or reply to some issues
Ghost
@ghost~5e9b5b00d73408ce4fe0ea52
Exactly!
Ghost
@ghost~5e9b5b00d73408ce4fe0ea52
@nayato seems to be the original maintainer
Andrew Bastien
@volundmush
Trying to locate any documentation for this... apart from Netty itself.
James Drawneek
@jmdrawneek
Hey guys, are there any local stack tools for Azure? I'm coming from AWS where you can simulate the whole stack using the serverless framework + deploy from the same config. Is there anything like that?
I see you can get containers for some of the services. Is there a common way to deploy from docker compose/kubernetes? For things like cloud functions + api gateways.
Adam Frisby
@AdamFrisby
Hi folks, I have a question regarding IByteBuffer pooling and async send methods. Please pardon me if it's already documented somewhere.
When sending a IByteBuffer to a channel via WriteAsync/WriteAndFlushAsync - will it a) increment the reference counter when passed in, and b) decrement it once it has been sent?
Trying to work out when I need to decrement my reference (i.e. can I do it after calling .Async, or do I need to .ContinueWith to release it?)
Adam Frisby
@AdamFrisby
Hi folks - one more quick question (the above question, seems to be it's automatic).
I'm having issues where with libuv the channel is made immediately Inactive. When not using libuv, it seems to work (but perf is terrible)
SoftPower
@dpozimski
hi, do u have any experience with enablind dotnetty libuv support for xamarin (ios & android)?
would be great if someone can discuss about it
Kroseida
@Kroseida
Hey. Can DotNetty communicate with Java Netty?
egmkang wang
@egmkang
@Kroseida yes, it can communicate with other language/framework, you just ensure your protocol
vsudhini
@vsudhini
Is there a good example of using dotnetty as a tcp client?
the client should open and close connection for every request
and we should be able to throttle number of requests
Alexander Gnauck
@agnauck

@vsudhini see the samples here:
https://github.com/Azure/DotNetty/tree/dev/examples

The EchoClient is probably the easiest to get started with

vsudhini
@vsudhini
I am only able to read partial message
_bootstrap = new Bootstrap();
_bootstrap
.Group(_eventGroup)
.Channel<TcpSocketChannel>()
.Option(ChannelOption.TcpNodelay, true)
.Option(ChannelOption.SoBacklog, 100)
.Option(ChannelOption.SoRcvbuf, int.MaxValue)
.Handler(new LoggingHandler("LSTN"))
.Handler(new ActionChannelInitializer<ISocketChannel>(channel =>
{
IChannelPipeline pipeline = channel.Pipeline;
//pipeline.AddLast(new DelimiterBasedFrameDecoder(int.MaxValue, BetaMessageEndDelimeter));
                pipeline.AddLast(new ClientHandler());
            }));
ClientHandler is getting only partial message
how can i read the entire message coming back from server
Alexander Gnauck
@agnauck
how big is your message? It normal in TCP protocols that bigger messages get received in multiple receive events and needs to be put together then based on your underlying protocol
vsudhini
@vsudhini
its around 8000 bytes
vsudhini
@vsudhini
how can i do request/response pattern with dotnetty
Nathan T.
@NateTheGreat714
@vsudhini Good question. You could create a state machine, but there are really many different possible ways to create a request and response system for any type of socket server, in any language that supports socket servers. Anyway, you could create a class that parses the responses and pass the socket object inside the constructor, and then create a class that takes the socket object to respond to as a parameter as well as the parsed message (or the parsed message object if you were to create a MessageParser class or something), and since you passed those two objects as parameters, you can use those object to send data back to the client using the socket object that was passed as a parameter in the responder class. Make sense? If not, DM me! :smile:
vsudhini
@vsudhini
@NateTheGreat714 thanks for the response ... I solved it by using taskcompletionsource
Nathan T.
@NateTheGreat714
@vsudhini Sounds cool. Glad to hear that you solved it. I am actually in a very similar situation, would you mind direct messaging me about the route and process of achieving your goal? And/or even showing me some example code you wrote to solve your issue?
JET74
@Tobbe1974
Hi... What would be the best way to block/wait reading more messages for a certain Channel/Context? I have a solution that is acting as a TCP bridge between a Gateway and an IoT Hub.. And while the application is connecting to the IoT hub, I would like to paus reading more messages from the Gateway. Is this solvable with DotNetty or do I have to create my own locking mechanism?
Juan Ramos
@ptjuanramos
Hi guys I don't know where to address this questions.
Does this command: az storage queue create, creates an queue if doesn't exist or recreates it
Gimble
@gimbledev
Hi, I have dotnetty and java netty connection I'm using DotNetty as Server, java Netty as client. And I writing a buffer from dotnetty in channelactive method, but netty not firing read packet. Please help
JET74
@Tobbe1974
Have anyone experienced that your application after a while runs out of memory because the PooledByteBufferAllocator eats all the memory from the instance? And in that case does anyone have a solution for it?
The problem is that when a client disconnects it still doesn't release the memory, and our clients goes up and down quite often.
Juan Ramos
@ptjuanramos
question out of context, do someone knows which version of Application Insights Snapshot Collector that is being used by Applicaton Insights in Azure?
MannuG
@mannu691
hello , can someone pls tell me how to execute a function when
this.channel.WriteAndFlushAsync(toSend)
is done
Arsene
@Tochemey

Hello I am having a connection issue:

Unhandled exception. DotNetty.Transport.Channels.ClosedChannelException: I/O error occurred.
   at DotNetty.Transport.Bootstrapping.Bootstrap.DoResolveAndConnectAsync(EndPoint remoteAddress, EndPoint localAddress)

However the port is listening

Arsene
@Tochemey
Never mind I have seen what was the issue. It was due to an exception during initialization.
Arsene
@Tochemey
However I am seeing connection refused issue. I am running on NET5
Arsene
@Tochemey
Hello good people, is this channel closed or?
Arsene
@Tochemey
@nayato Please what do we do when need assistance? It seems this channel is dead even to me the project is dead. I can see on github issues are not at least replied to and so many incertainty.
priyanshu850
@priyanshu850

Hello Everyone
I am trying to do something like this :

Logger.info("nested function 1.......", 123);
context.log("context nested function 1.......", 123);

Where Logger is my own library :
static info(...message: any[]) {
context.log(message);
}

Output is :
nested function 1.......,123
context nested function 1....... 123
there is anyway to get out same like context ?

Arthur
@Biacode
Hey there. Is there a way to pass hostname instead of IP address in bootstrap.ConnectAsync method?
Johann Duscher
@jonnydee
Hi, I wonder if DotNetty has any known security vulnerabilities? On GiHub, none are listed but I can't imagine there aren't any. Does anybody know where I should have a look? In particular, I'd like to know if DotNetty also suffers from a specific vulnerability the Java version "Netty" had in the past (see the corresponding Azure/DotNetty#576 for details).
Johann Duscher
@jonnydee
No response here and no response for the corresponding issue #576? Nobody is able to help with security concerns?
Juan Ramos
@ptjuanramos
Hi there, is there any room for devops?
Johann Duscher
@jonnydee
@ptjuanramos I wouldn't hope for a response here. Just have a look at the chat history of the last months. Only users asking questions and waiting for answers...forever...
angelababa
@ligg
does anyone know how to configure environment variables in linux
io.netty.allocator.numDirectArenas
dot is invalid symbol
Stefan Koch
@stevo-knievo

Hi everyone!
I just started with DotNetty/Netty
I'm working on a decoder for my custom protocol. Currently I'm using ReplayingDecoder<Enum> decoder.

Now I'm running into IndexOutOfRangeException: readerIndex(4) + length(1280) exceeds writerIndex(10): PooledHeapByteBuffer(ridx: 4, widx: 10, cap: 256)

So I tried to fix it as followed:

if (input.ReadableBytes >= _messageFrame.Length)
{
    _messageFrame.Payload = input.ReadBytes(_messageFrame.Length);
    Checkpoint(ProtocolDecoderState.ReadEpilog);    
}

which breaks my next switch case. case ProtocolDecoderState.ReadEpilog

Here is the whole code:

protected override void Decode(IChannelHandlerContext context, IByteBuffer input, List<object> output)
{
    switch (State)
    {
        case ProtocolDecoderState.ReadProlog:
            _messageFrame.Prolog = input.ReadByte();
            Checkpoint(ProtocolDecoderState.ReadMessageType);
            break;
        case ProtocolDecoderState.ReadMessageType:
            _messageFrame.SetMessageType(input.ReadByte());
            Checkpoint(ProtocolDecoderState.ReadLength);
            break;
        case ProtocolDecoderState.ReadLength:
            _messageFrame.Length = input.ReadShort();
            Checkpoint(ProtocolDecoderState.ReadPayload);
            break;
        case ProtocolDecoderState.ReadPayload:
            if (input.ReadableBytes >= _messageFrame.Length)
            {
                _messageFrame.Payload = input.ReadBytes(_messageFrame.Length);
                Checkpoint(ProtocolDecoderState.ReadEpilog);    
            }
            break;
        case ProtocolDecoderState.ReadEpilog:
            _messageFrame.Epilog = input.ReadByte();
            output.Add(ProtocolHelper.CovertByteFrameToMessage(_messageFrame));
            Checkpoint(ProtocolDecoderState.ReadProlog);
            _messageFrame = new MessageFrame();
            break;
        default:
            throw new InvalidDataException("Shouldn't reach here.");
    }
}

Do I need to use the ByteToMessageDecoder instead?
Can I not use the ReadBytes(int length) in the ReplayingDecoder?

Thanks!!

1 reply