Skip to content

Commit 92ddde0

Browse files
committed
add some tcp classes
1 parent 17331f1 commit 92ddde0

File tree

2 files changed

+38
-4
lines changed

2 files changed

+38
-4
lines changed

Diff for: app/Tcp/Controller/DemoController.php

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace App\Tcp\Controller;
4+
5+
use Swoft\Tcp\Server\Annotation\Mapping\TcpController;
6+
use Swoft\Tcp\Server\Annotation\Mapping\TcpMapping;
7+
8+
/**
9+
* Class DemoController
10+
*
11+
* @TcpController()
12+
*/
13+
class DemoController
14+
{
15+
/**
16+
* @TcpMapping("echo")
17+
*/
18+
public function index(): void
19+
{
20+
21+
}
22+
23+
/**
24+
* @TcpMapping("echo", root=true)
25+
*/
26+
public function echo(): void
27+
{
28+
29+
}
30+
}

Diff for: dev.composer.json

+8-4
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,18 @@
4040
"test": "./vendor/bin/phpunit -c phpunit.xml",
4141
"cs-fix": "./vendor/bin/php-cs-fixer fix $1"
4242
},
43-
"repositories": [
44-
{
43+
"repositories": {
44+
"packagist": {
45+
"type": "composer",
46+
"url": "https://mirrors.aliyun.com/composer/"
47+
},
48+
"0": {
4549
"type": "git",
4650
"url": "[email protected]:swoft-cloud/swoft-component.git"
4751
},
48-
{
52+
"1": {
4953
"type": "git",
5054
"url": "[email protected]:swoft-cloud/swoft-ext.git"
5155
}
52-
]
56+
}
5357
}

0 commit comments

Comments
 (0)