Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/Sockets/Elixir/sockets.elixir
Normal file
10
Task/Sockets/Elixir/sockets.elixir
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
defmodule Sockets do
|
||||
require Logger
|
||||
|
||||
def send_message(port, message) do
|
||||
{:ok, socket} = :gen_tcp.connect('localhost', port, [])
|
||||
:gen_tcp.send(socket, message)
|
||||
end
|
||||
end
|
||||
|
||||
Sockets.send_message(256, "hello socket world")
|
||||
Loading…
Add table
Add a link
Reference in a new issue