Both Client and Server is run on Elixir service.
Uncomment 2 lines in application.ex:
%{id: GenTcp.Server, start: {GenTcp.Server, :start_link, [[]]}},
%{id: GenTcp.Client, start: {GenTcp.Client, :start_link, [[]]}}
Start the server by command: iex -S mix
Run these command:
alias GenTcp.Client
Client.send_to_server("Hello")
Client.close_socket()
Client is run on Elixir service, Server is run on Python service.
Comment 2 lines in application.ex:
%{id: GenTcp.Server, start: {GenTcp.Server, :start_link, [[]]}},
%{id: GenTcp.Client, start: {GenTcp.Client, :start_link, [[]]}}
Terminal 1:
Start the server by command: iex -S mix
Run these commands to simulate the client-server:
alias GenTcp.ServerInteracPy
ServerInteracPy.start_server()
Terminal 2:
Run these commands:
cd lib/gen_tcp
python3 client_py.py