Skip to content

Commit

Permalink
update some for ws server
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Jun 22, 2020
1 parent b098586 commit 25de3bf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/db/src/Connection/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function getPostProcessor()
*
* @return void
*/
public function useDefaultPostProcessor()
public function useDefaultPostProcessor(): void
{
$this->postProcessor = $this->getDefaultPostProcessor();
}
Expand Down
1 change: 1 addition & 0 deletions src/websocket-server/src/Annotation/Mapping/WsModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* @Attribute("path", type="string"),
* @Attribute("controllers", type="array"),
* @Attribute("messageParser", type="string"),
* @Attribute("defaultCommand", type="string"),
* )
*/
final class WsModule
Expand Down
6 changes: 2 additions & 4 deletions src/websocket-server/src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
use Swoft\Bean\Annotation\Mapping\Bean;
use Swoft\Contract\SessionInterface;
use Swoft\Http\Message\Request;
use Swoft\Http\Message\Request as Psr7Request;
use Swoft\Http\Message\Response;
use Swoft\Http\Message\Response as Psr7Response;
use Swoft\Stdlib\Concern\DataPropertyTrait;
use Swoft\Stdlib\Helper\JsonHelper;
use Swoft\WebSocket\Server\Contract\MessageParserInterface;
Expand Down Expand Up @@ -152,8 +150,8 @@ public static function newFromArray(array $data): SessionInterface
$res->header = $data['resHeader'];

// Initialize psr7 Request and Response
$psr7Req = Psr7Request::new($req);
$psr7Res = Psr7Response::new($res);
$psr7Req = Request::new($req);
$psr7Res = Response::new($res);
$wsServer = Swoft::getBean(WsServerBean::SERVER);

// Initialize connection
Expand Down

0 comments on commit 25de3bf

Please sign in to comment.