Golang (1) 썸네일형 리스트형 Golang websocket 구현 javascript를 통해 http통신을 구현해본 것 처럼 이번에는 golang을 통해 websocket을 구현해볼 예정입니다.main.gopackage mainimport ( "fmt" "net/http")func main() { http.Handle("/public/", http.StripPrefix("/public/", http.FileServer(http.Dir("public")))) fmt.Println("open web server: 8000") http.ListenAndServe(":8000", nil)} 위 코드를 통하여 웹서버 실행public/test.html hello golang실행 결과브라우저에서 websocket 요청을 어떤식으로 보내는지 확인을 위한 handler 추가mai.. 이전 1 다음