This project is read-only.

Unable to send big response to client


When i try to return LIst of ArraySegment bytes to receiver i only can send up to 500 bytes and if i send more than that then server will stuck at send function and nothing will happened.

I'm using latest version 1.6.6

here is my code

public override void ExecuteCommand(MyAppSession session, StringRequestInfo requestInfo)
        List<ArraySegment<byte>> test = new List<ArraySegment<byte>>();
        test.Add(new ArraySegment<byte>(System.Text.Encoding.UTF8.GetBytes("a".PadLeft(25, 'a') + "b".PadLeft(25, 'b') + "c".PadLeft(25, 'c') + "d".PadLeft(25, 'd'))));
        test.Add(new ArraySegment<byte>(System.Text.Encoding.UTF8.GetBytes("e".PadLeft(25, 'e') + "f".PadLeft(25, 'f') + "g".PadLeft(25, 'g') + "h".PadLeft(25, 'h'))));
        test.Add(new ArraySegment<byte>(System.Text.Encoding.UTF8.GetBytes("i".PadLeft(25, 'i') + "j".PadLeft(25, 'j') + "k".PadLeft(25, 'k') + "l".PadLeft(25, 'l'))));
        test.Add(new ArraySegment<byte>(System.Text.Encoding.UTF8.GetBytes("m".PadLeft(25, 'm') + "n".PadLeft(25, 'n') + "o".PadLeft(25, 'o') + "p".PadLeft(25, 'p'))));
        test.Add(new ArraySegment<byte>(System.Text.Encoding.UTF8.GetBytes("q".PadLeft(25, 'q') + "r".PadLeft(25, 'r') + "s".PadLeft(25, 's') + "t".PadLeft(25, 't'))));
        test.Add(new ArraySegment<byte>(System.Text.Encoding.UTF8.GetBytes("u".PadLeft(25, 'u') + "w".PadLeft(25, 'w') + "x".PadLeft(25, 'x') + "y".PadLeft(25, 'y'))));
        test.Add(new ArraySegment<byte>(System.Text.Encoding.UTF8.GetBytes("z".PadLeft(25, 'z') + "0123456789")));


        Console.WriteLine("Response send");
        session.Logger.Debug("Response send");


kerryjiang wrote Jul 12, 2016 at 5:05 AM

Could you try to increase the sendingQueueSize in your configuration to a number more than 7?

It should be a walk around.