Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dunixir
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
teaching
dunixir
Merge requests
!16
Indexes
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Indexes
indexes
into
dev
Overview
0
Commits
13
Pipelines
0
Changes
9
Closed
BENARD Julien
requested to merge
indexes
into
dev
4 years ago
Overview
0
Commits
13
Pipelines
0
Changes
9
Expand
0
0
Merge request reports
Viewing commit
06394670
Prev
Next
Show latest version
9 files
+
201
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
9
Search (e.g. *.vue) (Ctrl+P)
06394670
POC Websocket clients + "echo for all" server
· 06394670
Julien29121998
authored
4 years ago
websocket/wsclient/lib/client_ws.ex
0 → 100644
+
13
−
0
Options
defmodule
ClientWs
do
use
WebSockex
def
start
(
_type
,
_args
)
do
{
:ok
,
spid
}
=
WebSockex
.
start_link
(
"ws://localhost:4000/ws/chat"
,
__MODULE__
,
:ok
)
WebSockex
.
send_frame
(
spid
,{
:text
,
"hello"
})
{
:ok
,
spid
}
end
def
handle_frame
({
:text
,
text
},
state
)
do
IO
.
inspect
(
text
);
{
:ok
,
state
}
end
end
Loading