-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update join room, create room and leave room (#174)
* update join room, create room and leave room * add new model for socketio * update * add allow header * delete empty space --------- Co-authored-by: [email protected] <under987..A> Co-authored-by: [email protected] <>
- Loading branch information
1 parent
863ab3e
commit e808531
Showing
7 changed files
with
120 additions
and
20 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
domain/src/main/kotlin/tw/waterballsa/gaas/events/SocketioEvent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package tw.waterballsa.gaas.events | ||
|
||
data class SocketioEvent( | ||
var type: String = "", | ||
var data: ChatData = ChatData(), | ||
) { | ||
constructor(type: String, userId: String, nickname: String, target: String) : this( | ||
type, | ||
ChatData(ChatUser(userId, nickname), target), | ||
) | ||
} | ||
|
||
data class ChatData( | ||
var user: ChatUser = ChatUser(), | ||
var target: String = "", | ||
) | ||
|
||
data class ChatUser( | ||
var id: String = "", | ||
var nickname: String = "", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
spring/src/main/kotlin/tw/waterballsa/gaas/spring/configs/socketio/SocketIOEvent.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
spring/src/main/kotlin/tw/waterballsa/gaas/spring/configs/socketio/SocketIOEventName.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package tw.waterballsa.gaas.spring.configs.socketio | ||
|
||
enum class SocketIOEventName (val eventName: String){ | ||
CHAT_MESSAGE("CHAT_MESSAGE"), | ||
CHATROOM_JOIN("CHATROOM_JOIN"), | ||
JOIN_ROOM("JOIN_ROOM"), | ||
LEAVE_ROOM("LEAVE_ROOM"), | ||
CONNECT_EVENT("CONNECT_EVENT"), | ||
DISCONNECT("DISCONNECT"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters