Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

'ETHERNET_SERVER_SEND_MAX_SIZE' was not declared in this scope #16

Closed
@vaelen

Description

@vaelen

Error:

Ethernet_Generic/src/EthernetServer_Impl.h:364:81: error: 'ETHERNET_SERVER_SEND_MAX_SIZE' was not declared in this scope

If you don't enable large buffer support, then the ETHERNET_SERVER_SEND_MAX_SIZE constant is not defiend and the code doesn't compile.

EthernetServer_Impl.h:327:

// Don't use larger size or hang, max is 16K for 1 socket
#ifdef ETHERNET_LARGE_BUFFERS
  #if MAX_SOCK_NUM <= 1
    #define ETHERNET_SERVER_SEND_MAX_SIZE         16384
  #elif MAX_SOCK_NUM <= 2
    #define ETHERNET_SERVER_SEND_MAX_SIZE         8192
  #elif MAX_SOCK_NUM <= 4
    #define ETHERNET_SERVER_SEND_MAX_SIZE         4096
  #else
    #define ETHERNET_SERVER_SEND_MAX_SIZE         2048
  #endif
#endif

EthernetServer_Impl.h:364

   written =  Ethernet.socketSend(sockindex, buf, min(bytesRemaining, (size_t) ETHERNET_SERVER_SEND_MAX_SIZE) );

I didn't submit a PR because I'm not sure what the constant should be set to if large buffers is disabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions