Skip to content

Commit

Permalink
text additions.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanak-michal committed Dec 18, 2023
1 parent 69facae commit 04ddeaa
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,6 @@ foreach ($protocol->getResponses() as $response) {
Directory `src` contains autoload file which accepts only Bolt library namespaces. Main Bolt namespace points to this
directory. If you have installed this project with composer, you have to load `vendor/autoload.php`.

## :vertical_traffic_light: Server state

Server state is not reported by server but it is evaluated by received response. You can access current state through property `$protocol->serverState`. This property is updated with every call `getResponse(s)`.

## :chains: Connection

Bolt class constructor accepts connection argument. This argument has to be instance of class which implements IConnection interface. Library offers few options.
Expand Down Expand Up @@ -253,6 +249,10 @@ timeout for establishing socket connection itself you have to set ini directive
_Setting up ini directive isn't part of connection class because function `ini_set` can be disabled on production
environments for security reasons._

## :vertical_traffic_light: Server state

Server state is not reported by server but it is evaluated by received response. You can access current state through property `$protocol->serverState`. This property is updated with every call `getResponse(s)`.

## :pushpin: More solutions

If you need simple class to cover basic functionality you can
Expand Down
25 changes: 21 additions & 4 deletions src/enum/Signature.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,25 @@
enum Signature: int
{
case NONE = 0;
case SUCCESS = 0x70; //112
case FAILURE = 0x7F; //127
case IGNORED = 0x7E; //126
case RECORD = 0x71; //113
/**
* The SUCCESS message indicates that the corresponding request has succeeded as intended. It may contain metadata relating to the outcome. Metadata keys are described in the section of this document relating to the message that began the exchange.
* @internal 112
*/
case SUCCESS = 0x70;
/**
* A FAILURE message response indicates that the client is not permitted to exchange further messages. Servers may choose to include metadata describing the nature of the failure.
* @internal 127
*/
case FAILURE = 0x7F;
/**
* The IGNORED message indicates that the corresponding request has not been carried out.
* @internal 126
*/
case IGNORED = 0x7E;
/**
* A RECORD message carries a sequence of values corresponding to a single entry in a result.
* These messages are currently only ever received in response to a PULL (PULL_ALL in v1, v2, and v3) message and will always be followed by a summary message.
* @internal 113
*/
case RECORD = 0x71;
}

0 comments on commit 04ddeaa

Please sign in to comment.