diff options
| author | RblSb <msrblsb@gmail.com> | 2020-02-24 07:58:56 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2020-02-24 07:58:56 +0300 |
| commit | 9c6cd2c2310d2e3ce3d1a6e3350a97e7ba0ca657 (patch) | |
| tree | 3eb12f0eee7ba05b7e70c740561eff31e06b608a /src/Client.hx | |
| parent | c561fb9e2e42e4968f2b48cd535f208e90f8c12c (diff) | |
Start working on user folder
Diffstat (limited to 'src/Client.hx')
| -rw-r--r-- | src/Client.hx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Client.hx b/src/Client.hx index 7aa14c5..4604ab7 100644 --- a/src/Client.hx +++ b/src/Client.hx @@ -1,9 +1,8 @@ package; #if nodejs +import js.node.http.IncomingMessage; import js.npm.ws.WebSocket; -#elseif js -import js.html.WebSocket; #end import haxe.EnumFlags; @@ -23,15 +22,21 @@ class Client { #if nodejs public final ws:WebSocket; public final id:Int; + public final req:IncomingMessage; #end public var name:String; public var group:EnumFlags<ClientGroup>; public var isLeader(get, set):Bool; public var isAdmin(get, set):Bool; - public function new(?ws:WebSocket, ?id:Int, name:String, group:Int) { + #if nodejs + public function new(?ws:WebSocket, ?req:IncomingMessage, ?id:Int, name:String, group:Int) { + #else + public function new(name:String, group:Int) { + #end #if nodejs this.ws = ws; + this.req = req; this.id = id; #end this.name = name; |
