/
tcp_server.cljs
37 lines (24 loc) · 1.32 KB
/
tcp_server.cljs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
(ns chromex.app.sockets.tcp-server (:require-macros [chromex.app.sockets.tcp-server :refer [gen-wrap]])
(:require [chromex.core]))
; -- functions --------------------------------------------------------------------------------------------------------------
(defn create* [config properties]
(gen-wrap :function ::create config properties))
(defn update* [config socket-id properties]
(gen-wrap :function ::update config socket-id properties))
(defn set-paused* [config socket-id paused]
(gen-wrap :function ::set-paused config socket-id paused))
(defn listen* [config socket-id address port backlog]
(gen-wrap :function ::listen config socket-id address port backlog))
(defn disconnect* [config socket-id]
(gen-wrap :function ::disconnect config socket-id))
(defn close* [config socket-id]
(gen-wrap :function ::close config socket-id))
(defn get-info* [config socket-id]
(gen-wrap :function ::get-info config socket-id))
(defn get-sockets* [config]
(gen-wrap :function ::get-sockets config))
; -- events -----------------------------------------------------------------------------------------------------------------
(defn on-accept* [config channel & args]
(gen-wrap :event ::on-accept config channel args))
(defn on-accept-error* [config channel & args]
(gen-wrap :event ::on-accept-error config channel args))