Skip to content

Instantly share code, notes, and snippets.

@genericpenguin
Created March 11, 2018 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save genericpenguin/aab72b5ae328d2c0585d1178999ac845 to your computer and use it in GitHub Desktop.
Save genericpenguin/aab72b5ae328d2c0585d1178999ac845 to your computer and use it in GitHub Desktop.
require "socket"
module BSAF
class Player
property conn
@ip_address : Socket::IPAddress
def initialize(@conn : TCPSocket, @ch : Channel(String))
@ip_address = @conn.remote_address
end
def send(msg : String)
@ch.send(msg)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment