Skip to content

Commit

Permalink
Merge pull request #39 from PBTP/fix/chat-gateway-namespace
Browse files Browse the repository at this point in the history
fix: 도메인으로 소켓 서빙하기 위하여 ChatGateWay namespace 변경
  • Loading branch information
emibgo2 authored Oct 4, 2024
2 parents d0f9767 + 05e1873 commit 31f1b5a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/chat/presentation/chat.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ import {
OnGatewayConnection,
OnGatewayDisconnect,
WebSocketGateway,
WebSocketServer,
} from '@nestjs/websockets';
import { Server, Socket } from 'socket.io';
import { ForbiddenException, Logger, NotFoundException } from '@nestjs/common';
import { ChatMessageDto, ChatRoomDto } from './chat.dto';
import { AuthService } from '../../auth/application/auth.service';
import { Subscribe } from '../decorator/socket.decorator';
import { UnauthorizedException } from '@nestjs/common/exceptions';
import { ChatService } from '../application/chat.service';
import { UserDto } from '../../auth/presentation/user.dto';
WebSocketServer
} from "@nestjs/websockets";
import { Server, Socket } from "socket.io";
import { ForbiddenException, Logger, NotFoundException } from "@nestjs/common";
import { ChatMessageDto, ChatRoomDto } from "./chat.dto";
import { AuthService } from "../../auth/application/auth.service";
import { Subscribe } from "../decorator/socket.decorator";
import { UnauthorizedException } from "@nestjs/common/exceptions";
import { ChatService } from "../application/chat.service";
import { UserDto } from "../../auth/presentation/user.dto";

export class UserSocket extends Socket {
user: UserDto;
}

@WebSocketGateway(5000, { namespace: 'chat' })
@WebSocketGateway(5000)
export class ChatGateway implements OnGatewayConnection, OnGatewayDisconnect {
private readonly logger: Logger = new Logger(ChatGateway.name);

Expand Down

0 comments on commit 31f1b5a

Please sign in to comment.