Skip to content

Get the stream - #28

Open
marcguyer wants to merge 1 commit into
graze:masterfrom
chdr:getStream
Open

Get the stream#28
marcguyer wants to merge 1 commit into
graze:masterfrom
chdr:getStream

Conversation

@marcguyer

@marcguyer marcguyer commented Jun 25, 2018

Copy link
Copy Markdown

Close #27.

Add a public method to get the StreamWriter object from the Client. This enables closing the socket:

$statsd = new \Graze\DogStatsD\Client();
$statsd->configure(
    [
        'host' => '127.0.0.1',
        'port' => 8125,
        'namespace' => 'some.namespace',
    ]
);

$statsd->gauge('someMetric', 1);

$stream = $statsd->getStream();
$stream->__destruct();

unset($statsd);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant