Skip to content

Improve consistency across Server/Client/Serial (path included) #2364

Description

@charlesgoyard

Hi,
please add an active() method is Server and Serial. This lets the program check the communications state before reading/writing.

for Server.java:

/**
   * Return true if this server is still active and hasn't run
   * into any trouble.
   */
  public boolean active() {
    return (thread != null);
  }

for Serial.java:

   /**
   * Return true if this port is still active and hasn't run
   * into any trouble.
   */
  public boolean active() {
      return (port.isOpened());
  }

Thank you,
Charles

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions