Skip to content

Releases: graze/telnet-client

Max bytes read

11 Dec 10:12
543f5f0
Compare
Choose a tag to compare

Optionally configure a maximum number of bytes to read after which an exception is thrown. This is to prevent an infinite loop if the prompt is never matched.

Read timeout

30 Jun 00:27
b8091d6
Compare
Choose a tag to compare

Add socket read timeout

PHP 7.3 and 7.4 support

15 May 09:07
bf0b226
Compare
Choose a tag to compare

Adds support for PHP 7.3 and 7.4.

Technically, no code changes. This is just the first version that is formally being tested under these versions of PHP.

Other minor changes:

  • Non-functional cleanup of code and README.
  • Use official composer docker image rather than graze/composer.
  • Updated dependencies in lock file.

Add support for null line endings

12 Nov 11:43
99c2994
Compare
Choose a tag to compare

Some telnet implementations do not end sends with a consistent line ending. Add support for those implementations by removing the line ending check when line ending is null.

Prompt matching will be more expensive in these instances as each character received will be checked against the prompt regex.

This adds support for implementations such as #15.

Add timeout to socket

30 Jul 22:38
4c6b4eb
Compare
Choose a tag to compare

Add the ability to set a timeout when connecting.

Fix TelnetClientInterface::execute definition

13 Mar 23:40
Compare
Choose a tag to compare

Update TelnetClientInterface::execute() interface to match the concrete class.

Add PromptMatcher interface

12 Mar 08:44
386e429
Compare
Choose a tag to compare

Add PromptMatcherInterface to allow the implementation of custom prompt matcher, this allows for more complicated matchers rather than a simple string match.

Don't connect on __construct

01 Mar 16:54
Compare
Choose a tag to compare

Don't connect on __construct but provide a connect method. This allows the client to be injected as a dependency without requiring the dsn to be known ahead of time.

As arguments are now split between the __construct and connect methods, we no longer require a separate builder, which has been replaced with the more simple factory method on the client.

// previous usage
class MyClass
{
    public function __construct(TelnetClient $client)
    {
        ...
    }

    public function doSomething()
    {
        // do something with client that is already connected to $dsn ($dsn required ahead of time of use)
        ...
    }
}

// new usage
class MyClass
{
    public function __construct(TelnetClient $client)
    {
        ...
    }

    public function doSomething($dsn)
    {
        // connect to dsn of choice
        $this->client->connect($dsn);
        // do something with client
        ...
    }
}

Initial release

18 Feb 12:51
Compare
Choose a tag to compare
Merge pull request #1 from graze/initialCommit

Initial commit for review before tagging for release