Giter Site home page Giter Site logo

Receiving large reply message about secs4net HOT 9 CLOSED

mkjeff avatar mkjeff commented on July 20, 2024 1
Receiving large reply message

from secs4net.

Comments (9)

TiltonJH avatar TiltonJH commented on July 20, 2024 1

I have created a pull request (#37), which fixes this issue.

Or have a look here: https://github.com/TiltonJH/secs4net

from secs4net.

a-v-kalabuhov avatar a-v-kalabuhov commented on July 20, 2024

The list data items in SecsMessage are limited up to 255 elements. It may be a reason why the program did crash.

from secs4net.

BinaryAssault avatar BinaryAssault commented on July 20, 2024

I ran into this issue (or at least something similar) and was able to get a workaround. I was receiving a reply message that was very big (list of >55000). Problem was, the ReceiveBufferSize in the SecsGem class was too small. I am not a creator of the SW I am working on, so I cannot give code snippets.

But if you change the ReceiveBufferSize for the socket to accommodate your data on instantiation, it should continue to work.

from secs4net.

a-v-kalabuhov avatar a-v-kalabuhov commented on July 20, 2024

it should continue to work.

Thank you very much!

from secs4net.

dzhydaniel avatar dzhydaniel commented on July 20, 2024

kelvin,can you share how to start up EAP Host

from secs4net.

a-v-kalabuhov avatar a-v-kalabuhov commented on July 20, 2024

BinaryAssault, I meant there is a hardcoded limitation in secs4net.
It's just not possible to add to a message a list with more than 255 elements, because the library throws an exception.

   private Item(IReadOnlyList<Item> items)
   {
       if (items.Count > byte.MaxValue)
           throw new ArgumentOutOfRangeException(nameof(items) + "." + nameof(items.Count), items.Count,
               @"List items length out of range, max length: 255");
   ...
   }

But array item length isn't limited.

from secs4net.

TiltonJH avatar TiltonJH commented on July 20, 2024

Well the issue is in the type, where the 2 last Bits determine the size of the length value. Secs supports up to 3 Byte for length value. Secs4Net only ever uses 1 Byte.

The issue should mostly be within the Item class.

If no one else will fix this. I will. But not within the next month. I currently don't got the time.

from secs4net.

a-v-kalabuhov avatar a-v-kalabuhov commented on July 20, 2024

I have created a pull request (#37), which fixes this issue.

Or have a look here: https://github.com/TiltonJH/secs4net

Thanks!

from secs4net.

mkjeff avatar mkjeff commented on July 20, 2024

Thanks for @TiltonJH contribution. I'm happy to see the fork.

btw, welcome to taste v2

from secs4net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.