-
Notifications
You must be signed in to change notification settings - Fork 4
소켓 명세서
io(${url}/team-${teamId});
팀 namespace: /team-teamId(숫자)
Emit (Client → Server)
{
teamId: number;
userId: number;
}
Emit (Client → Server)
users room 참가
Emit (Client → Server)
users room 나가기
Emit (Server→ Client)
{
onlineUsers: { userId: number }[];
}
room이름: chat-{chatId}
Emit (Client → Server)
{
teamId: number;
userId: number;
}
채팅방 페이지에 들어옴
채팅방(chat-room) 참가 요청
Emit (Server→ Client )
{
chatRooms:
{
chatRoomId: number;
chatRoomName: string;
lastMessage:
{
messageId: number;
content: string;
createdAt: Date;
userId: number;
chatRoomId: number;
}
}[];
}
Emit (Client → Server)
{
chatRoomId: number;
}
초기 메시지 리스트, 유저 정보 요청
Emit (Server → Client)
{
chatRoomId: number;
userList: { userId: number }[]
messageList:
{
messageId: number;
content: string;
createdAt: Date;
userId: number;
chatRoomId: number;
}[]
}
채팅방 입장
초기 메세지 리스트, 유저 리스트 응답
Emit (Client → Server)
{
content: string;
userId: number;
chatRoomId: number;
}
메시지 전송
Emit (Server → Client)
in chat-id room
{
messageId: number;
content: string;
userId: number;
createdAt: Date;
chatRoomId: number;
}
메시지 수신
Emit (Client→ Server)
{
teamId: number;
chatRoomName: string;
userList: { userId: number }[];
message:
{
content: string;
userId: number;
chatRoomId: number;
}
}
채팅방 생성
Emit (Client→ Server)
{
teamId: number;
chatRoomId: number;
userList: { userId: number }[];
}
유저 방에 초대
Emit (Server → Client)
{
chatRoomId: number;
chatRoomName: string;
lastMessage:
{
messageId: number;
content: string;
createdAt: Date;
userId: number;
chatRoomId: number;
}
}
채팅방에 초대 받음
Emit (Server → Client)
{
chatRoomId: number;
userList: {userId: number}[];
}
다른 사용자가 참여함
Emit (Client → Server)
{
chatRoomId: number;
userId: number;
}
채팅방 나가기
Emit (Server → Client)
{
chatRoomId: number;
userId: number
}
다른 사용자가 떠남
Emit (Client → Server)
{
chatRoomId: number;
chatRoomName: string;
}
채팅방 이름 변경 요청
Emit (Server→ Client)
{
chatRoomId: number;
chatRoomName: string;
}
채팅방 이름 변경 응답
Emit (Server→ Client)
error message
Emit (Client → Server)
보드 페이지 접속
Emit (Server→ Client)
{
id: number;
title: string;
content: string;
x: number;
y: number;
color: number;
updatedAt: Date;
updatedBy: number;
createdAt: Date;
createdBy: number;
whoIsDragging: number;
whoIsUpdating: number;
}[]
포스트잇 리스트 전송
Emit (Client → Server)
보드 페이지 나감
Emit (Client → Server)
{
title: string;
content: string;
x: number;
y: number;
color: number;
createdBy: number;
}
새로운 포스트잇 생성
Emit (Server→ Client)
{
id: number;
title: string;
content: string;
x: number;
y: number;
color: number;
updatedAt: Date;
updatedBy: number;
createdAt: Date;
createdBy: number;
whoIsDragging: number;
whoIsUpdating: number;
}
Emit (Client → Server)
{
id: number;
title: string;
content: string;
x: number;
y: number;
color: number;
updatedAt: Date;
updatedBy: number;
createdAt: Date;
createdBy: number;
whoIsDragging: number;
whoIsUpdating: number;
}
Emit (Server→ Client)
{
id: number;
title: string;
content: string;
x: number;
y: number;
color: number;
updatedAt: Date;
updatedBy: number;
createdAt: Date;
createdBy: number;
whoIsDragging: number;
whoIsUpdating: number;
}
Emit (Client → Server)
{
id: number;
title: string;
content: string;
x: number;
y: number;
color: number;
updatedAt: Date;
updatedBy: number;
createdAt: Date;
createdBy: number;
whoIsDragging: number;
whoIsUpdating: number;
}
Emit (Server→ Client)
{
id: number;
title: string;
content: string;
x: number;
y: number;
color: number;
updatedAt: Date;
updatedBy: number;
createdAt: Date;
createdBy: number;
whoIsDragging: number;
whoIsUpdating: number;
}
Emit (Client → Server)
{
id: number;
title: string;
content: string;
x: number;
y: number;
color: number;
updatedAt: Date;
updatedBy: number;
createdAt: Date;
createdBy: number;
whoIsDragging: number;
whoIsUpdating: number;
}
Emit (Server→ Client)
{
id: number;
title: string;
content: string;
x: number;
y: number;
color: number;
updatedAt: Date;
updatedBy: number;
createdAt: Date;
createdBy: number;
whoIsDragging: number;
whoIsUpdating: number;
}
Emit (Client → Server)
{
id: number;
title: string;
content: string;
x: number;
y: number;
color: number;
updatedAt: Date;
updatedBy: number;
createdAt: Date;
createdBy: number;
whoIsDragging: number;
whoIsUpdating: number;
}
Emit (Server→ Client)
{
id: number;
title: string;
content: string;
x: number;
y: number;
color: number;
updatedAt: Date;
updatedBy: number;
createdAt: Date;
createdBy: number;
whoIsDragging: number;
whoIsUpdating: number;
}
Emit (Client → Server)
{
postitId: number;
}
Emit (Server→ Client)
{
id: number;
title: string;
content: string;
x: number;
y: number;
color: number;
updatedAt: Date;
updatedBy: number;
createdAt: Date;
createdBy: number;
whoIsDragging: number;
whoIsUpdating: number;
}
Emit (Server→ Client)
error message