File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Swoft Tcp Protocol
1+ # Swoft Tcp
22
33[ ![ Latest Stable Version] ( http://img.shields.io/packagist/v/swoft/tcp-protocol.svg )] ( https://packagist.org/packages/swoft/tcp-protocol )
44[ ![ Php Version] ( https://img.shields.io/badge/php-%3E=7.1-brightgreen.svg?maxAge=2592000 )] ( https://secure.php.net/ )
55[ ![ Swoft Doc] ( https://img.shields.io/badge/docs-passing-green.svg?maxAge=2592000 )] ( https://www.swoft.org/docs )
66[ ![ Swoft License] ( https://img.shields.io/hexpm/l/plug.svg?maxAge=2592000 )] ( https://github.com/swoft-cloud/swoft/blob/master/LICENSE )
77
8- Swoft Tcp Protocol Component
8+ Swoft Tcp Common Component
99
1010## Install
1111
1212- composer command
1313
1414``` bash
15- composer require swoft/tcp-protocol
15+ composer require swoft/tcp
1616```
1717
1818## Resources
Original file line number Diff line number Diff line change 1515 "swoft/stdlib" : " ~2.0.0"
1616 },
1717 "autoload" : {
18- "classmap" : [
19- ],
2018 "psr-4" : {
21- "Swoft\\ Tcp\\ Protocol \\ " : " src/"
19+ "Swoft\\ Tcp\\ " : " src/"
2220 }
2321 },
2422 "require-dev" : {
2523 "phpunit/phpunit" : " ^7.5"
2624 },
2725 "autoload-dev" : {
2826 "psr-4" : {
29- "SwoftTest\\ Tcp\\ Protocol \\ Unit\\ " : " test/unit/" ,
30- "SwoftTest\\ Tcp\\ Protocol \\ Testing\\ " : " test/testing/"
27+ "SwoftTest\\ Tcp\\ Unit\\ " : " test/unit/" ,
28+ "SwoftTest\\ Tcp\\ Testing\\ " : " test/testing/"
3129 }
3230 },
3331 "scripts" : {
Original file line number Diff line number Diff line change 11<?php declare (strict_types=1 );
22
3- namespace Swoft \Tcp \ Protocol ;
3+ namespace Swoft \Tcp ;
44
55use Swoft \Helper \ComposerJSON ;
66use Swoft \SwoftComponent ;
Original file line number Diff line number Diff line change 11<?php declare (strict_types=1 );
22
3- namespace Swoft \Tcp \Protocol \ Contract ;
3+ namespace Swoft \Tcp \Contract ;
44
5- use Swoft \Tcp \Protocol \ Package ;
5+ use Swoft \Tcp \Package ;
66
77/**
88 * Interface PackerInterface - Data packer interface
Original file line number Diff line number Diff line change 11<?php declare (strict_types=1 );
22
3- namespace Swoft \Tcp \Protocol \ Exception ;
3+ namespace Swoft \Tcp \Exception ;
44
55use RuntimeException ;
66
Original file line number Diff line number Diff line change 11<?php declare (strict_types=1 );
22
3- namespace Swoft \Tcp \ Protocol ;
3+ namespace Swoft \Tcp ;
44
55use ReflectionException ;
66use Swoft \Bean \Exception \ContainerException ;
Original file line number Diff line number Diff line change 11<?php declare (strict_types=1 );
22
3- namespace Swoft \Tcp \Protocol \ Packer ;
3+ namespace Swoft \Tcp \Packer ;
44
55use ReflectionException ;
66use Swoft \Bean \Annotation \Mapping \Bean ;
77use Swoft \Bean \Exception \ContainerException ;
88use Swoft \Stdlib \Helper \JsonHelper ;
9- use Swoft \Tcp \Protocol \ Contract \PackerInterface ;
10- use Swoft \Tcp \Protocol \ Package ;
9+ use Swoft \Tcp \Contract \PackerInterface ;
10+ use Swoft \Tcp \Package ;
1111
1212/**
1313 * Class JsonPacker
Original file line number Diff line number Diff line change 11<?php declare (strict_types=1 );
22
3- namespace Swoft \Tcp \Protocol \ Packer ;
3+ namespace Swoft \Tcp \Packer ;
44
55use function explode ;
66use ReflectionException ;
77use Swoft \Bean \Annotation \Mapping \Bean ;
88use Swoft \Bean \Exception \ContainerException ;
9- use Swoft \Tcp \Protocol \ Contract \PackerInterface ;
10- use Swoft \Tcp \Protocol \ Package ;
9+ use Swoft \Tcp \Contract \PackerInterface ;
10+ use Swoft \Tcp \Package ;
1111use function trim ;
1212
1313/**
Original file line number Diff line number Diff line change 11<?php declare (strict_types=1 );
22
3- namespace Swoft \Tcp \ Protocol ;
3+ namespace Swoft \Tcp ;
44
55use Swoft ;
66use Swoft \Bean \Exception \ContainerException ;
7- use Swoft \Tcp \Protocol \ Contract \PackerInterface ;
8- use Swoft \Tcp \Protocol \ Exception \ProtocolException ;
9- use Swoft \Tcp \Protocol \ Packer \JsonPacker ;
10- use Swoft \Tcp \Protocol \ Packer \SimpleTokenPacker ;
7+ use Swoft \Tcp \Contract \PackerInterface ;
8+ use Swoft \Tcp \Exception \ProtocolException ;
9+ use Swoft \Tcp \Packer \JsonPacker ;
10+ use Swoft \Tcp \Packer \SimpleTokenPacker ;
1111use function array_keys ;
1212use function array_merge ;
1313
Original file line number Diff line number Diff line change 11<?php declare (strict_types=1 );
22
3- namespace SwoftTest \Tcp \Protocol \ Unit ;
3+ namespace SwoftTest \Tcp \Unit ;
44
55use PHPUnit \Framework \TestCase ;
6- use Swoft \Tcp \Protocol \ Package ;
6+ use Swoft \Tcp \Package ;
77
88/**
99 * Class PackageTest
You can’t perform that action at this time.
0 commit comments