채팅 기능 확인
모든 작업이 완료됐으면 웹 서버를 구동하고 채팅을 해보자.
$ go build
$ ./app
[negroni] listening on :3000
[negroni] Started GET /
[negroni] Completed 200 OK in 5.980607ms
[negroni] Started GET /rooms
[negroni] Completed 200 OK in 502.343?s
[negroni] Completed 200 OK in 386.823?s
[negroni] Completed 200 OK in 601.815?s
[negroni] Started GET /ws/562a48182c612a4501000004
[negroni] Completed 0 in 342.644?s
[negroni] Started GET /rooms/562a48182c612a4501000004/messages
[negroni] Completed 200 OK in 794.563?s
[negroni] Completed 0 in 327.868?s
[negroni] Completed 200 OK in 697.225?s
2015/10/31 15:12:02 read from websocket: &{ObjectIdHex("") ObjectIdHex("562a48182c612a4501000004") 안녕하세요~ 2015-10-31 15:12:02.028891941 +0900 KST 0xc208030420}
2015/10/31 15:12:02 write to websocket: &{ObjectIdHex("56345bb22c612a2c55000001") ObjectIdHex("562a48182c612a4501000004") 안녕하세요~ 2015-10-31 15:12:02.028983141 +0900 KST 0xc208030420}
2015/10/31 15:12:09 read from websocket: &{ObjectIdHex("") ObjectIdHex("562a48182c612a4501000004") 네~ 오랜만이시네요 ^^ 2015-10-31 15:12:09.206170422 +0900 KST 0xc2081128a0}
2015/10/31 15:12:09 write to websocket: &{ObjectIdHex("56345bb92c612a2c55000002") ObjectIdHex("562a48182c612a4501000004") 네~ 오랜만이시네요 ^^ 2015-10-31 15:12:09.206254197 +0900 KST 0xc2081128a0}
2015/10/31 15:12:16 read from websocket: &{ObjectIdHex("") ObjectIdHex("562a48182c612a4501000004") 요즘 어떻게 지내시나요? 2015-10-31 15:12:16.173811316 +0900 KST 0xc2081128a0}
2015/10/31 15:12:16 write to websocket: &{ObjectIdHex("56345bc02c612a2c55000003") ObjectIdHex("562a48182c612a4501000004") 요즘 어떻게 지내시나요? 2015-10-31 15:12:16.173855404 +0900 KST 0xc2081128a0}
2015/10/31 15:12:23 read from websocket: &{ObjectIdHex("") ObjectIdHex("562a48182c612a4501000004") 잘 지내고 있습니다 ㅎㅎㅎ 2015-10-31 15:12:23.791054896 +0900 KST 0xc208030420}
2015/10/31 15:12:23 write to websocket: &{ObjectIdHex("56345bc72c612a2c55000004") ObjectIdHex("562a48182c612a4501000004") 잘 지내고 있습니다 ㅎㅎㅎ 2015-10-31 15:12:23.79110893 +0900 KST 0xc208030420}