ws-examples icon indicating copy to clipboard operation
ws-examples copied to clipboard

Examples of using github.com/gobwas/ws

Results 9 ws-examples issues
Sort by recently updated
recently updated
newest added

``` // Broadcast sends message to all alive users. func (c *Chat) Broadcast(method string, params Object) error { var buf bytes.Buffer w := wsutil.NewWriter(&buf, ws.StateServerSide, ws.OpText) encoder := json.NewEncoder(w) r...

I'm trying to understand the example, specifically why do we need to create a netpoll even descriptor for the purpose of reading messages from the connection? Comparing to most other...

us is just a new var with a new array header, but the array's body still point to the original memory

Thank you for publishing this example. I get this error after running bin/chat on Mac OS X terminal, after successfully running Make. `2020/01/21 19:44:11 [::1]:3333 > [::1]:58202: upgrade error: handshake...

Hello, I am trying the chat and proxy examples on Mac. When I run the script, it returns: ``` 2019/07/24 17:23:34 upstream "chat" ok 2019/07/24 17:23:34 proxy is listening on...

https://github.com/MithrilJS/mithril.js/pull/2317

Hi , I read this part fo code func (p *Pool) worker(task func()) { defer func() {

Hi @gobwas, thank you for creating awesome example ! I have a question about your sample code. https://github.com/gobwas/ws-examples/blob/master/src/chat/chat.go#L79-L80 ```go func (u *User) readRequest() (*Request, error) { u.io.Lock() defer u.io.Unlock() ......

hi how i use group in this examples,i need send msg to a group of user.