mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
0176385654
Signed-off-by: Vishal Rana <vr@labstack.com>
48 lines
547 B
Markdown
48 lines
547 B
Markdown
---
|
|
title: WebSocket
|
|
menu:
|
|
side:
|
|
parent: recipes
|
|
weight: 5
|
|
---
|
|
|
|
### Server
|
|
|
|
`server.go`
|
|
|
|
{{< embed "websocket/server.go" >}}
|
|
|
|
### Client
|
|
|
|
`index.html`
|
|
|
|
{{< embed "websocket/public/index.html" >}}
|
|
|
|
### Output
|
|
|
|
`Client`
|
|
|
|
```sh
|
|
Hello, Client!
|
|
Hello, Client!
|
|
Hello, Client!
|
|
Hello, Client!
|
|
Hello, Client!
|
|
```
|
|
|
|
`Server`
|
|
|
|
```sh
|
|
Hello, Server!
|
|
Hello, Server!
|
|
Hello, Server!
|
|
Hello, Server!
|
|
Hello, Server!
|
|
```
|
|
|
|
### Maintainers
|
|
|
|
- [vishr](https://github.com/vishr)
|
|
|
|
### [Source Code](https://github.com/labstack/echo/blob/master/recipes/websocket)
|