Obsolete
/
ipcd
Archived
3
0
Fork 0

Sending real ip address in websocketd.

master
Karchnu 2020-09-20 12:54:47 +02:00
parent 80b98e3ba6
commit 9912ef8a5e
1 changed files with 1 additions and 2 deletions

View File

@ -224,8 +224,7 @@ def websocket_client_connection(client)
# message = IPC::Message.from_json(JSON).to_packet # message = IPC::Message.from_json(JSON).to_packet
# => JSON has to include these attributes: mtype, utype, payload # => JSON has to include these attributes: mtype, utype, payload
# message = IPC::Message.new mtype, utype, payload # message = IPC::Message.new mtype, utype, payload
remote_address = client.remote_address.address message = IPC::Message.new sfd, 1, 1.to_u8, "{\"ipaddress\": \"#{real_ip_address}\"}"
message = IPC::Message.new sfd, 1, 1.to_u8, "{\"ipaddress\": \"#{remote_address}\"}"
if Context.print_messages if Context.print_messages
Baguette::Log.info "to trackingd: #{message.to_s}" Baguette::Log.info "to trackingd: #{message.to_s}"
end end