Toggle navigation
Toggle navigation
This project
Loading...
Sign in
최시원
/
Singer-Composer
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Mukho
2021-11-29 19:52:27 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6aaa0b5268fe2634f892055735a4bdf024591b83
6aaa0b52
1 parent
3502f199
으악
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
app.js
app.js
View file @
6aaa0b5
...
...
@@ -85,7 +85,6 @@ app.use(router) // router 정의
// Socket.io
var
chatnamespace
=
io
.
of
(
'/chatnamespace'
)
io
.
sockets
.
on
(
'connection'
,
function
(
socket
)
{
...
...
@@ -127,7 +126,7 @@ io.sockets.on('connection', function(socket) {
/* 접속 종료 */
socket
.
on
(
'disconnect'
,
function
()
{
if
(
socket
.
name
!=
undefined
){
console
.
log
(
logString
+
socket
.
name
+
' 님이 나가셨습니다.'
)
console
.
log
(
logString
+
socket
.
name
+
' 님이 나가셨습니다.
('
+
ip
+
')
'
)
/* 나가는 사람을 제외한 나머지 유저에게 메시지 전송 */
socket
.
broadcast
.
emit
(
'update'
,
{
type
:
'disconnect'
,
name
:
'SERVER'
,
message
:
socket
.
name
+
'님이 나가셨습니다.'
});
}
...
...
Please
register
or
login
to post a comment