@jayesol/jayeson.lib.sports 2.2.7-beta2 → 2.2.7-beta4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/basketball_codec.js +1 -209
- package/lib/client.js +1 -686
- package/lib/codec.js +1 -129
- package/lib/core.js +1 -497
- package/lib/data_structure.js +1 -208
- package/lib/dispatch.js +1 -324
- package/lib/index.js +1 -27
- package/lib/merge.js +1 -569
- package/lib/message_class.js +1 -466
- package/lib/module.js +1 -87
- package/lib/mutable.js +1 -1061
- package/lib/protobuf_bundle.js +1 -9683
- package/lib/receive.js +1 -484
- package/lib/soccer_codec.js +1 -168
- package/lib/tennis_codec.js +1 -177
- package/package.json +6 -3
package/lib/data_structure.js
CHANGED
|
@@ -1,208 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.TTLWrapper = exports.MergeableWrapper = exports.ConvertedMsg = exports.MessageBeforeTransform = exports.DeltaOutgoingImpl = exports.OutgoingImpl = exports.IndexedSnapshotImpl = exports.Incoming = void 0;
|
|
27
|
-
const Collections = __importStar(require("typescript-collections"));
|
|
28
|
-
const jayeson_lib_record_1 = require("@jayesol/jayeson.lib.record");
|
|
29
|
-
class Incoming {
|
|
30
|
-
constructor(_msgType, _stream, _data) {
|
|
31
|
-
this._msgType = _msgType;
|
|
32
|
-
this._stream = _stream;
|
|
33
|
-
this._data = _data;
|
|
34
|
-
}
|
|
35
|
-
msgType() {
|
|
36
|
-
return this._msgType;
|
|
37
|
-
}
|
|
38
|
-
stream() {
|
|
39
|
-
return this._stream;
|
|
40
|
-
}
|
|
41
|
-
data() {
|
|
42
|
-
return this._data;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.Incoming = Incoming;
|
|
46
|
-
class IndexedSnapshotImpl extends jayeson_lib_record_1.Snapshot {
|
|
47
|
-
constructor(matches = {}, partitions = new Collections.Dictionary()) {
|
|
48
|
-
super(matches);
|
|
49
|
-
this.partitions = partitions;
|
|
50
|
-
}
|
|
51
|
-
getPartitions() {
|
|
52
|
-
let keys = new Collections.Set();
|
|
53
|
-
for (var partition of this.partitions.keys()) {
|
|
54
|
-
keys.add(partition);
|
|
55
|
-
}
|
|
56
|
-
return keys;
|
|
57
|
-
}
|
|
58
|
-
//TODO Return Immutable Map/clone??
|
|
59
|
-
getPartitionMap() {
|
|
60
|
-
return this.partitions;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
exports.IndexedSnapshotImpl = IndexedSnapshotImpl;
|
|
64
|
-
IndexedSnapshotImpl.EMPTY_SNAPSHOT = new IndexedSnapshotImpl();
|
|
65
|
-
class OutgoingImpl {
|
|
66
|
-
constructor(_msgType, _msg) {
|
|
67
|
-
this._msgType = _msgType;
|
|
68
|
-
this._msg = _msg;
|
|
69
|
-
}
|
|
70
|
-
msgType() {
|
|
71
|
-
return this._msgType;
|
|
72
|
-
}
|
|
73
|
-
msg() {
|
|
74
|
-
return this._msg;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
exports.OutgoingImpl = OutgoingImpl;
|
|
78
|
-
class DeltaOutgoingImpl extends OutgoingImpl {
|
|
79
|
-
constructor(_msgType, _delta, _after, _before) {
|
|
80
|
-
super(_msgType, _delta);
|
|
81
|
-
this._delta = _delta;
|
|
82
|
-
this._after = _after;
|
|
83
|
-
this._before = _before;
|
|
84
|
-
}
|
|
85
|
-
after() {
|
|
86
|
-
return this._after;
|
|
87
|
-
}
|
|
88
|
-
delta() {
|
|
89
|
-
return this._delta;
|
|
90
|
-
}
|
|
91
|
-
before() {
|
|
92
|
-
return this._before;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
exports.DeltaOutgoingImpl = DeltaOutgoingImpl;
|
|
96
|
-
class MessageBeforeTransform {
|
|
97
|
-
constructor() {
|
|
98
|
-
this.transformEvent = [];
|
|
99
|
-
this.suppressMatch = [];
|
|
100
|
-
this.insertMatch = [];
|
|
101
|
-
this.deleteMatch = [];
|
|
102
|
-
this.insertEvent = [];
|
|
103
|
-
this.deleteEvent = [];
|
|
104
|
-
this.afterSs = IndexedSnapshotImpl.EMPTY_SNAPSHOT;
|
|
105
|
-
this.beforeSs = IndexedSnapshotImpl.EMPTY_SNAPSHOT;
|
|
106
|
-
}
|
|
107
|
-
getTransformEvent() {
|
|
108
|
-
return this.transformEvent;
|
|
109
|
-
}
|
|
110
|
-
setTransformEvent(eventId) {
|
|
111
|
-
this.transformEvent.push(eventId);
|
|
112
|
-
}
|
|
113
|
-
getSuppressMatch() {
|
|
114
|
-
return this.suppressMatch;
|
|
115
|
-
}
|
|
116
|
-
setSuppressMatch(matchId) {
|
|
117
|
-
this.suppressMatch.push(matchId);
|
|
118
|
-
}
|
|
119
|
-
setAfterSs(afterSs) {
|
|
120
|
-
this.afterSs = afterSs;
|
|
121
|
-
}
|
|
122
|
-
getAfterSs() {
|
|
123
|
-
return this.afterSs;
|
|
124
|
-
}
|
|
125
|
-
setBeforeSs(beforeSs) {
|
|
126
|
-
this.beforeSs = beforeSs;
|
|
127
|
-
}
|
|
128
|
-
getBeforeSs() {
|
|
129
|
-
return this.beforeSs;
|
|
130
|
-
}
|
|
131
|
-
setInsertEvent(eventId) {
|
|
132
|
-
this.insertEvent.push(eventId);
|
|
133
|
-
}
|
|
134
|
-
getInsertEvent() {
|
|
135
|
-
return this.insertEvent;
|
|
136
|
-
}
|
|
137
|
-
setDeleteEvent(eventId) {
|
|
138
|
-
this.deleteEvent.push(eventId);
|
|
139
|
-
}
|
|
140
|
-
getDeleteEvent() {
|
|
141
|
-
return this.deleteEvent;
|
|
142
|
-
}
|
|
143
|
-
setInsertMatch(matchId) {
|
|
144
|
-
this.insertMatch.push(matchId);
|
|
145
|
-
}
|
|
146
|
-
getInsertMatch() {
|
|
147
|
-
return this.insertMatch;
|
|
148
|
-
}
|
|
149
|
-
setDeleteMatch(matchId) {
|
|
150
|
-
this.deleteMatch.push(matchId);
|
|
151
|
-
}
|
|
152
|
-
getDeleteMatch() {
|
|
153
|
-
return this.deleteMatch;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
exports.MessageBeforeTransform = MessageBeforeTransform;
|
|
157
|
-
var ConvertedMsg;
|
|
158
|
-
(function (ConvertedMsg) {
|
|
159
|
-
ConvertedMsg[ConvertedMsg["INSERT_EVENT_TO_UPDATE"] = 0] = "INSERT_EVENT_TO_UPDATE";
|
|
160
|
-
ConvertedMsg[ConvertedMsg["DELETE_EVENT_TO_UPDATE"] = 1] = "DELETE_EVENT_TO_UPDATE";
|
|
161
|
-
ConvertedMsg[ConvertedMsg["INSERT_MATCH_SUPPRESS"] = 2] = "INSERT_MATCH_SUPPRESS";
|
|
162
|
-
ConvertedMsg[ConvertedMsg["DELETE_MATCH_SUPPRESS"] = 3] = "DELETE_MATCH_SUPPRESS";
|
|
163
|
-
ConvertedMsg[ConvertedMsg["ORIGINAL"] = 4] = "ORIGINAL";
|
|
164
|
-
})(ConvertedMsg = exports.ConvertedMsg || (exports.ConvertedMsg = {}));
|
|
165
|
-
class MergeableWrapper {
|
|
166
|
-
constructor() {
|
|
167
|
-
this.snap = IndexedSnapshotImpl.EMPTY_SNAPSHOT;
|
|
168
|
-
}
|
|
169
|
-
setDeltaOut(out) {
|
|
170
|
-
this.deltaOut = out;
|
|
171
|
-
}
|
|
172
|
-
setAfter(after) {
|
|
173
|
-
this.snap = after;
|
|
174
|
-
}
|
|
175
|
-
getDeltaOut() {
|
|
176
|
-
return this.deltaOut;
|
|
177
|
-
}
|
|
178
|
-
getAfter() {
|
|
179
|
-
return this.snap;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
exports.MergeableWrapper = MergeableWrapper;
|
|
183
|
-
class TTLWrapper {
|
|
184
|
-
_RemovedKey() {
|
|
185
|
-
this.removedSs = IndexedSnapshotImpl.EMPTY_SNAPSHOT;
|
|
186
|
-
this.remainingSs = IndexedSnapshotImpl.EMPTY_SNAPSHOT;
|
|
187
|
-
this.restoredSs = IndexedSnapshotImpl.EMPTY_SNAPSHOT;
|
|
188
|
-
}
|
|
189
|
-
setRemovedSs(remove) {
|
|
190
|
-
this.removedSs = remove;
|
|
191
|
-
}
|
|
192
|
-
getRemovedSs() {
|
|
193
|
-
return this.removedSs;
|
|
194
|
-
}
|
|
195
|
-
setRemainingSs(remain) {
|
|
196
|
-
this.remainingSs = remain;
|
|
197
|
-
}
|
|
198
|
-
getRemainingSs() {
|
|
199
|
-
return this.remainingSs;
|
|
200
|
-
}
|
|
201
|
-
getRestoredSs() {
|
|
202
|
-
return this.restoredSs;
|
|
203
|
-
}
|
|
204
|
-
setRestoredSs(restore) {
|
|
205
|
-
this.restoredSs = restore;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
exports.TTLWrapper = TTLWrapper;
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var n=Object.getOwnPropertyDescriptor(t,s);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,n)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&__createBinding(t,e,s);return __setModuleDefault(t,e),t};Object.defineProperty(exports,"__esModule",{value:!0}),exports.TTLWrapper=exports.MergeableWrapper=exports.ConvertedMsg=exports.MessageBeforeTransform=exports.DeltaOutgoingImpl=exports.OutgoingImpl=exports.IndexedSnapshotImpl=exports.Incoming=void 0;const Collections=__importStar(require("typescript-collections")),jayeson_lib_record_1=require("@jayesol/jayeson.lib.record");class Incoming{constructor(e,t,s){this._msgType=e,this._stream=t,this._data=s}msgType(){return this._msgType}stream(){return this._stream}data(){return this._data}}exports.Incoming=Incoming;class IndexedSnapshotImpl extends jayeson_lib_record_1.Snapshot{constructor(e={},t=new Collections.Dictionary){super(e),this.partitions=t}getPartitions(){let e=new Collections.Set;for(var t of this.partitions.keys())e.add(t);return e}getPartitionMap(){return this.partitions}}exports.IndexedSnapshotImpl=IndexedSnapshotImpl,IndexedSnapshotImpl.EMPTY_SNAPSHOT=new IndexedSnapshotImpl;class OutgoingImpl{constructor(e,t){this._msgType=e,this._msg=t}msgType(){return this._msgType}msg(){return this._msg}}exports.OutgoingImpl=OutgoingImpl;class DeltaOutgoingImpl extends OutgoingImpl{constructor(e,t,s,r){super(e,t),this._delta=t,this._after=s,this._before=r}after(){return this._after}delta(){return this._delta}before(){return this._before}}exports.DeltaOutgoingImpl=DeltaOutgoingImpl;class MessageBeforeTransform{constructor(){this.transformEvent=[],this.suppressMatch=[],this.insertMatch=[],this.deleteMatch=[],this.insertEvent=[],this.deleteEvent=[],this.afterSs=IndexedSnapshotImpl.EMPTY_SNAPSHOT,this.beforeSs=IndexedSnapshotImpl.EMPTY_SNAPSHOT}getTransformEvent(){return this.transformEvent}setTransformEvent(e){this.transformEvent.push(e)}getSuppressMatch(){return this.suppressMatch}setSuppressMatch(e){this.suppressMatch.push(e)}setAfterSs(e){this.afterSs=e}getAfterSs(){return this.afterSs}setBeforeSs(e){this.beforeSs=e}getBeforeSs(){return this.beforeSs}setInsertEvent(e){this.insertEvent.push(e)}getInsertEvent(){return this.insertEvent}setDeleteEvent(e){this.deleteEvent.push(e)}getDeleteEvent(){return this.deleteEvent}setInsertMatch(e){this.insertMatch.push(e)}getInsertMatch(){return this.insertMatch}setDeleteMatch(e){this.deleteMatch.push(e)}getDeleteMatch(){return this.deleteMatch}}var ConvertedMsg;exports.MessageBeforeTransform=MessageBeforeTransform,function(e){e[e.INSERT_EVENT_TO_UPDATE=0]="INSERT_EVENT_TO_UPDATE",e[e.DELETE_EVENT_TO_UPDATE=1]="DELETE_EVENT_TO_UPDATE",e[e.INSERT_MATCH_SUPPRESS=2]="INSERT_MATCH_SUPPRESS",e[e.DELETE_MATCH_SUPPRESS=3]="DELETE_MATCH_SUPPRESS",e[e.ORIGINAL=4]="ORIGINAL"}(ConvertedMsg=exports.ConvertedMsg||(exports.ConvertedMsg={}));class MergeableWrapper{constructor(){this.snap=IndexedSnapshotImpl.EMPTY_SNAPSHOT}setDeltaOut(e){this.deltaOut=e}setAfter(e){this.snap=e}getDeltaOut(){return this.deltaOut}getAfter(){return this.snap}}exports.MergeableWrapper=MergeableWrapper;class TTLWrapper{_RemovedKey(){this.removedSs=IndexedSnapshotImpl.EMPTY_SNAPSHOT,this.remainingSs=IndexedSnapshotImpl.EMPTY_SNAPSHOT,this.restoredSs=IndexedSnapshotImpl.EMPTY_SNAPSHOT}setRemovedSs(e){this.removedSs=e}getRemovedSs(){return this.removedSs}setRemainingSs(e){this.remainingSs=e}getRemainingSs(){return this.remainingSs}getRestoredSs(){return this.restoredSs}setRestoredSs(e){this.restoredSs=e}}exports.TTLWrapper=TTLWrapper;
|
package/lib/dispatch.js
CHANGED
|
@@ -1,324 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.RelayEPG = exports.AbstractEPG = exports.DispatchersGroup = exports.EndPointGroupManager = exports.EPDispatcherException = exports.IndicatorWrapper = exports.PartialSnapshotWrapper = exports.FullSnapshotWrapper = exports.WrapperImpl = exports.EPGM_IMPL = void 0;
|
|
16
|
-
const data_structure_1 = require("./data_structure");
|
|
17
|
-
const core_1 = require("./core");
|
|
18
|
-
const message_class_1 = require("./message_class");
|
|
19
|
-
const injection_js_1 = require("injection-js");
|
|
20
|
-
exports.EPGM_IMPL = new injection_js_1.InjectionToken('EpgmInstance');
|
|
21
|
-
class WrapperImpl {
|
|
22
|
-
constructor(__epg, __stream) {
|
|
23
|
-
this.__epg = __epg;
|
|
24
|
-
this.__stream = __stream;
|
|
25
|
-
}
|
|
26
|
-
epg() {
|
|
27
|
-
return this.__epg;
|
|
28
|
-
}
|
|
29
|
-
stream() {
|
|
30
|
-
return this.__stream;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.WrapperImpl = WrapperImpl;
|
|
34
|
-
class FullSnapshotWrapper extends WrapperImpl {
|
|
35
|
-
constructor(_epg, _stream, _epd, fullSnapshot) {
|
|
36
|
-
super(_epg, _stream);
|
|
37
|
-
this._epg = _epg;
|
|
38
|
-
this._stream = _stream;
|
|
39
|
-
this._epd = _epd;
|
|
40
|
-
this.fullSnapshot = fullSnapshot;
|
|
41
|
-
}
|
|
42
|
-
epg() {
|
|
43
|
-
return this._epg;
|
|
44
|
-
}
|
|
45
|
-
stream() {
|
|
46
|
-
return this._stream;
|
|
47
|
-
}
|
|
48
|
-
epd() {
|
|
49
|
-
return this._epd;
|
|
50
|
-
}
|
|
51
|
-
process() {
|
|
52
|
-
this._epd.readyToDispatch();
|
|
53
|
-
let mwList = this._epg.generateFull(this);
|
|
54
|
-
if (mwList != null) {
|
|
55
|
-
for (let i = 0; i < mwList.length; i++) {
|
|
56
|
-
let mw = mwList[i];
|
|
57
|
-
this._epd.submit(mw);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
getFullSnapshot() {
|
|
62
|
-
return this.fullSnapshot;
|
|
63
|
-
}
|
|
64
|
-
setFullSnapshot(fullSnapshot) {
|
|
65
|
-
this.fullSnapshot = fullSnapshot;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
exports.FullSnapshotWrapper = FullSnapshotWrapper;
|
|
69
|
-
class PartialSnapshotWrapper extends WrapperImpl {
|
|
70
|
-
constructor(_delta, _epg, _stream) {
|
|
71
|
-
super(_epg, _stream);
|
|
72
|
-
this._delta = _delta;
|
|
73
|
-
this._epg = _epg;
|
|
74
|
-
this._stream = _stream;
|
|
75
|
-
}
|
|
76
|
-
epg() {
|
|
77
|
-
return this._epg;
|
|
78
|
-
}
|
|
79
|
-
stream() {
|
|
80
|
-
return this._stream;
|
|
81
|
-
}
|
|
82
|
-
delta() {
|
|
83
|
-
return this._delta;
|
|
84
|
-
}
|
|
85
|
-
process() {
|
|
86
|
-
//console.log("the partial snapshot"+JSON.stringify(this.epg.getEPDs(this.stream))+"out going length: "+this.epg.generatePartial(this).length);
|
|
87
|
-
let outgoingList = this._epg.generatePartial(this);
|
|
88
|
-
let epds = this._epg.getEPDs(this._stream);
|
|
89
|
-
for (let i = 0; i < epds.length; i++) {
|
|
90
|
-
let epd = epds[i];
|
|
91
|
-
for (let j = 0; j < outgoingList.length; j++) {
|
|
92
|
-
if (epd.isReadyToDispatch()) {
|
|
93
|
-
let out = outgoingList[j];
|
|
94
|
-
epd.submit(out);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
exports.PartialSnapshotWrapper = PartialSnapshotWrapper;
|
|
101
|
-
class IndicatorWrapper extends WrapperImpl {
|
|
102
|
-
constructor(_delta, _epg, _stream) {
|
|
103
|
-
super(_epg, _stream);
|
|
104
|
-
this._delta = _delta;
|
|
105
|
-
this._epg = _epg;
|
|
106
|
-
this._stream = _stream;
|
|
107
|
-
}
|
|
108
|
-
process() {
|
|
109
|
-
let epds = this._epg.getEPDs(this._stream);
|
|
110
|
-
for (let i = 0; i < epds.length; i++) {
|
|
111
|
-
let epd = epds[i];
|
|
112
|
-
epd.submit(this._delta);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
exports.IndicatorWrapper = IndicatorWrapper;
|
|
117
|
-
class EPDispatcherException extends Error {
|
|
118
|
-
constructor(message) {
|
|
119
|
-
super(message);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
exports.EPDispatcherException = EPDispatcherException;
|
|
123
|
-
let EndPointGroupManager = class EndPointGroupManager {
|
|
124
|
-
constructor(_fsRepo, _grp) {
|
|
125
|
-
this._fsRepo = _fsRepo;
|
|
126
|
-
this._grp = _grp;
|
|
127
|
-
this.relayEPG = new RelayEPG(_grp);
|
|
128
|
-
this.relayEPG.startGetingDeltaSnapshot(_fsRepo);
|
|
129
|
-
}
|
|
130
|
-
fsRepo() {
|
|
131
|
-
return this._fsRepo;
|
|
132
|
-
}
|
|
133
|
-
grp() {
|
|
134
|
-
return this._grp;
|
|
135
|
-
}
|
|
136
|
-
pushFullSnapshotWrapper(epg, epd) {
|
|
137
|
-
let stream = epd.stream();
|
|
138
|
-
epd.isInitialized().then((ready) => {
|
|
139
|
-
if (ready) {
|
|
140
|
-
let rawSnapshot = this._fsRepo.getSnapshot(stream);
|
|
141
|
-
let sw = new FullSnapshotWrapper(epg, stream, epd, rawSnapshot);
|
|
142
|
-
epg.submitForProcess(sw);
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
registerEPD(epd) {
|
|
147
|
-
if (this.relayEPG.hasEPD(epd.stream(), epd.id())) {
|
|
148
|
-
throw new EPDispatcherException("EPD already exists in a group.Id: " + epd.id + " Stream: " + epd.stream);
|
|
149
|
-
}
|
|
150
|
-
this.relayEPG.addEPD(epd);
|
|
151
|
-
this.pushFullSnapshotWrapper(this.relayEPG, epd);
|
|
152
|
-
}
|
|
153
|
-
deregisterEPD(epd) {
|
|
154
|
-
// Clean up EPD
|
|
155
|
-
this.relayEPG.removeEPD(epd);
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
EndPointGroupManager = __decorate([
|
|
159
|
-
(0, injection_js_1.Injectable)(),
|
|
160
|
-
__param(0, (0, injection_js_1.Inject)(core_1.FSREPO_IMPL)),
|
|
161
|
-
__metadata("design:paramtypes", [Object, message_class_1.SportsFeedMessageGroup])
|
|
162
|
-
], EndPointGroupManager);
|
|
163
|
-
exports.EndPointGroupManager = EndPointGroupManager;
|
|
164
|
-
class DispatchersGroup {
|
|
165
|
-
constructor(streamName) {
|
|
166
|
-
this.streamName = streamName;
|
|
167
|
-
this.dispatchers = {};
|
|
168
|
-
}
|
|
169
|
-
addEpd(epd) {
|
|
170
|
-
this.dispatchers[epd.id()] = epd;
|
|
171
|
-
}
|
|
172
|
-
removeEpd(epd) {
|
|
173
|
-
let current = this.dispatchers[epd.id()];
|
|
174
|
-
delete this.dispatchers[epd.id()];
|
|
175
|
-
return current;
|
|
176
|
-
}
|
|
177
|
-
get(id) {
|
|
178
|
-
return this.dispatchers[id];
|
|
179
|
-
}
|
|
180
|
-
getAll() {
|
|
181
|
-
return Object.keys(this.dispatchers).map((k) => {
|
|
182
|
-
return this.dispatchers[k];
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
isEmpty() {
|
|
186
|
-
return Object.keys(this.dispatchers).length == 0;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
exports.DispatchersGroup = DispatchersGroup;
|
|
190
|
-
class AbstractEPG {
|
|
191
|
-
constructor(sportsFeedGroup) {
|
|
192
|
-
this.sportsFeedGroup = sportsFeedGroup;
|
|
193
|
-
this.dispatchers = {};
|
|
194
|
-
}
|
|
195
|
-
hasEPD(stream, id) {
|
|
196
|
-
let dGrp = this.dispatchers[stream];
|
|
197
|
-
if (dGrp !== undefined) {
|
|
198
|
-
return dGrp.get(id) !== undefined;
|
|
199
|
-
}
|
|
200
|
-
else {
|
|
201
|
-
return false;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
addEPD(epd) {
|
|
205
|
-
let grp = this.dispatchers[epd.stream()];
|
|
206
|
-
if (grp === undefined) {
|
|
207
|
-
this.dispatchers[epd.stream()] = new DispatchersGroup(epd.stream());
|
|
208
|
-
}
|
|
209
|
-
this.dispatchers[epd.stream()].addEpd(epd);
|
|
210
|
-
}
|
|
211
|
-
removeEPD(epd) {
|
|
212
|
-
let grp = this.dispatchers[epd.stream()];
|
|
213
|
-
if (grp !== undefined) {
|
|
214
|
-
grp.removeEpd(epd);
|
|
215
|
-
if (grp.isEmpty()) {
|
|
216
|
-
delete this.dispatchers[epd.stream()];
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
isEmpty() {
|
|
221
|
-
return Object.keys(this.dispatchers).length == 0;
|
|
222
|
-
}
|
|
223
|
-
getEPDs(stream) {
|
|
224
|
-
let dGrp = this.dispatchers[stream];
|
|
225
|
-
if (dGrp !== undefined) {
|
|
226
|
-
return dGrp.getAll();
|
|
227
|
-
}
|
|
228
|
-
else {
|
|
229
|
-
return [];
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
getStreams() {
|
|
233
|
-
return Object.keys(this.dispatchers);
|
|
234
|
-
}
|
|
235
|
-
startGetingDeltaSnapshot(fsRepo) {
|
|
236
|
-
fsRepo.registerSnapshotHandler(this);
|
|
237
|
-
}
|
|
238
|
-
stopGetingDeltaSnapshot(fsRepo) {
|
|
239
|
-
fsRepo.deRegisterSnapshotHandler(this);
|
|
240
|
-
}
|
|
241
|
-
process(stream, snapshot) {
|
|
242
|
-
if (this.sportsFeedGroup.isIndicatorMessage(snapshot.msgType())) {
|
|
243
|
-
let filterIndicatorWrapper = new IndicatorWrapper(snapshot, this, stream);
|
|
244
|
-
this.submitForProcess(filterIndicatorWrapper);
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
let partWrapper = new PartialSnapshotWrapper(snapshot, this, stream);
|
|
248
|
-
this.submitForProcess(partWrapper);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
getSportsFeedGrp() {
|
|
252
|
-
return this.sportsFeedGroup;
|
|
253
|
-
}
|
|
254
|
-
generateFull(wrapper) {
|
|
255
|
-
throw new Error("Method not implemented.");
|
|
256
|
-
}
|
|
257
|
-
generatePartial(wrapper) {
|
|
258
|
-
throw new Error("Method not implemented.");
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
exports.AbstractEPG = AbstractEPG;
|
|
262
|
-
let RelayEPG = class RelayEPG extends AbstractEPG {
|
|
263
|
-
constructor(_sportsFeedGroup) {
|
|
264
|
-
super(_sportsFeedGroup);
|
|
265
|
-
this._sportsFeedGroup = _sportsFeedGroup;
|
|
266
|
-
}
|
|
267
|
-
submitForProcess(wrapper) {
|
|
268
|
-
wrapper.process();
|
|
269
|
-
}
|
|
270
|
-
onException(e) {
|
|
271
|
-
console.error("Exception when dispatching snapshots to EPDs from RelayEPG. ", e);
|
|
272
|
-
return null;
|
|
273
|
-
}
|
|
274
|
-
generateFull(wrapper) {
|
|
275
|
-
let ss = wrapper.getFullSnapshot();
|
|
276
|
-
let fssStart = new data_structure_1.OutgoingImpl(this._sportsFeedGroup.FULLSNAPSHOT_START(), new Object());
|
|
277
|
-
let reset = new data_structure_1.DeltaOutgoingImpl(this._sportsFeedGroup.DATA_RESET(), ss, ss, data_structure_1.IndexedSnapshotImpl.EMPTY_SNAPSHOT);
|
|
278
|
-
let insertMatch = new data_structure_1.DeltaOutgoingImpl(this._sportsFeedGroup.DATA_INSERT_MATCH(), ss, ss, data_structure_1.IndexedSnapshotImpl.EMPTY_SNAPSHOT);
|
|
279
|
-
let insertEvent = new data_structure_1.DeltaOutgoingImpl(this._sportsFeedGroup.DATA_INSERT_EVENT(), ss, ss, data_structure_1.IndexedSnapshotImpl.EMPTY_SNAPSHOT);
|
|
280
|
-
let insertRecord = new data_structure_1.DeltaOutgoingImpl(this._sportsFeedGroup.DATA_INSERT_ODD(), ss, ss, data_structure_1.IndexedSnapshotImpl.EMPTY_SNAPSHOT);
|
|
281
|
-
let fssEnd = new data_structure_1.OutgoingImpl(this._sportsFeedGroup.FULLSNAPSHOT_END(), new Object());
|
|
282
|
-
return [fssStart, reset, insertMatch, insertEvent, insertRecord, fssEnd];
|
|
283
|
-
}
|
|
284
|
-
generatePartial(wrapper) {
|
|
285
|
-
let delta = wrapper.delta();
|
|
286
|
-
if (delta.constructor.name == "TTLOutgoing") {
|
|
287
|
-
return this.generateTtl(delta);
|
|
288
|
-
}
|
|
289
|
-
return [delta];
|
|
290
|
-
}
|
|
291
|
-
generateTtl(outGng) {
|
|
292
|
-
// Return if Message Type is Refresh
|
|
293
|
-
if (this.isSameFormat(outGng.msgType(), this._sportsFeedGroup.ADMIN_REFRESH())) {
|
|
294
|
-
return [];
|
|
295
|
-
}
|
|
296
|
-
let ttlType = outGng.getTtlType();
|
|
297
|
-
if (ttlType == core_1.TTLType.REMOVE) {
|
|
298
|
-
// Process Remove Message as Normal Partial Message
|
|
299
|
-
return [outGng];
|
|
300
|
-
}
|
|
301
|
-
else {
|
|
302
|
-
return this.generateTtlRestore(outGng);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
generateTtlRestore(outGng) {
|
|
306
|
-
let insertMatch = new data_structure_1.DeltaOutgoingImpl(this._sportsFeedGroup.DATA_INSERT_MATCH(), outGng.delta(), outGng.delta(), data_structure_1.IndexedSnapshotImpl.EMPTY_SNAPSHOT);
|
|
307
|
-
let insertEvent = new data_structure_1.DeltaOutgoingImpl(this._sportsFeedGroup.DATA_INSERT_EVENT(), outGng.delta(), outGng.delta(), data_structure_1.IndexedSnapshotImpl.EMPTY_SNAPSHOT);
|
|
308
|
-
let insertRecord = new data_structure_1.DeltaOutgoingImpl(this._sportsFeedGroup.DATA_INSERT_ODD(), outGng.delta(), outGng.delta(), data_structure_1.IndexedSnapshotImpl.EMPTY_SNAPSHOT);
|
|
309
|
-
return [insertMatch, insertEvent, insertRecord];
|
|
310
|
-
}
|
|
311
|
-
isSameFormat(lhs, messageClass) {
|
|
312
|
-
if (lhs.instanceClass() == messageClass.instanceClass() && lhs.constructor.name == messageClass.constructor.name) {
|
|
313
|
-
return true;
|
|
314
|
-
}
|
|
315
|
-
else {
|
|
316
|
-
return false;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
};
|
|
320
|
-
RelayEPG = __decorate([
|
|
321
|
-
(0, injection_js_1.Injectable)(),
|
|
322
|
-
__metadata("design:paramtypes", [message_class_1.SportsFeedMessageGroup])
|
|
323
|
-
], RelayEPG);
|
|
324
|
-
exports.RelayEPG = RelayEPG;
|
|
1
|
+
"use strict";var __decorate=this&&this.__decorate||function(t,e,s,r){var a,p=arguments.length,o=p<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,r);else for(var i=t.length-1;i>=0;i--)(a=t[i])&&(o=(p<3?a(o):p>3?a(e,s,o):a(e,s))||o);return p>3&&o&&Object.defineProperty(e,s,o),o},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__param=this&&this.__param||function(t,e){return function(s,r){e(s,r,t)}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.RelayEPG=exports.AbstractEPG=exports.DispatchersGroup=exports.EndPointGroupManager=exports.EPDispatcherException=exports.IndicatorWrapper=exports.PartialSnapshotWrapper=exports.FullSnapshotWrapper=exports.WrapperImpl=exports.EPGM_IMPL=void 0;const data_structure_1=require("./data_structure"),core_1=require("./core"),message_class_1=require("./message_class"),injection_js_1=require("injection-js");exports.EPGM_IMPL=new injection_js_1.InjectionToken("EpgmInstance");class WrapperImpl{constructor(t,e){this.__epg=t,this.__stream=e}epg(){return this.__epg}stream(){return this.__stream}}exports.WrapperImpl=WrapperImpl;class FullSnapshotWrapper extends WrapperImpl{constructor(t,e,s,r){super(t,e),this._epg=t,this._stream=e,this._epd=s,this.fullSnapshot=r}epg(){return this._epg}stream(){return this._stream}epd(){return this._epd}process(){this._epd.readyToDispatch();let t=this._epg.generateFull(this);if(null!=t)for(let e=0;e<t.length;e++){let s=t[e];this._epd.submit(s)}}getFullSnapshot(){return this.fullSnapshot}setFullSnapshot(t){this.fullSnapshot=t}}exports.FullSnapshotWrapper=FullSnapshotWrapper;class PartialSnapshotWrapper extends WrapperImpl{constructor(t,e,s){super(e,s),this._delta=t,this._epg=e,this._stream=s}epg(){return this._epg}stream(){return this._stream}delta(){return this._delta}process(){let t=this._epg.generatePartial(this),e=this._epg.getEPDs(this._stream);for(let s=0;s<e.length;s++){let r=e[s];for(let e=0;e<t.length;e++)if(r.isReadyToDispatch()){let s=t[e];r.submit(s)}}}}exports.PartialSnapshotWrapper=PartialSnapshotWrapper;class IndicatorWrapper extends WrapperImpl{constructor(t,e,s){super(e,s),this._delta=t,this._epg=e,this._stream=s}process(){let t=this._epg.getEPDs(this._stream);for(let e=0;e<t.length;e++){t[e].submit(this._delta)}}}exports.IndicatorWrapper=IndicatorWrapper;class EPDispatcherException extends Error{constructor(t){super(t)}}exports.EPDispatcherException=EPDispatcherException;let EndPointGroupManager=class{constructor(t,e){this._fsRepo=t,this._grp=e,this.relayEPG=new RelayEPG(e),this.relayEPG.startGetingDeltaSnapshot(t)}fsRepo(){return this._fsRepo}grp(){return this._grp}pushFullSnapshotWrapper(t,e){let s=e.stream();e.isInitialized().then(r=>{if(r){let r=this._fsRepo.getSnapshot(s),a=new FullSnapshotWrapper(t,s,e,r);t.submitForProcess(a)}})}registerEPD(t){if(this.relayEPG.hasEPD(t.stream(),t.id()))throw new EPDispatcherException("EPD already exists in a group.Id: "+t.id+" Stream: "+t.stream);this.relayEPG.addEPD(t),this.pushFullSnapshotWrapper(this.relayEPG,t)}deregisterEPD(t){this.relayEPG.removeEPD(t)}};EndPointGroupManager=__decorate([(0,injection_js_1.Injectable)(),__param(0,(0,injection_js_1.Inject)(core_1.FSREPO_IMPL)),__metadata("design:paramtypes",[Object,message_class_1.SportsFeedMessageGroup])],EndPointGroupManager),exports.EndPointGroupManager=EndPointGroupManager;class DispatchersGroup{constructor(t){this.streamName=t,this.dispatchers={}}addEpd(t){this.dispatchers[t.id()]=t}removeEpd(t){let e=this.dispatchers[t.id()];return delete this.dispatchers[t.id()],e}get(t){return this.dispatchers[t]}getAll(){return Object.keys(this.dispatchers).map(t=>this.dispatchers[t])}isEmpty(){return 0==Object.keys(this.dispatchers).length}}exports.DispatchersGroup=DispatchersGroup;class AbstractEPG{constructor(t){this.sportsFeedGroup=t,this.dispatchers={}}hasEPD(t,e){let s=this.dispatchers[t];return void 0!==s&&void 0!==s.get(e)}addEPD(t){void 0===this.dispatchers[t.stream()]&&(this.dispatchers[t.stream()]=new DispatchersGroup(t.stream())),this.dispatchers[t.stream()].addEpd(t)}removeEPD(t){let e=this.dispatchers[t.stream()];void 0!==e&&(e.removeEpd(t),e.isEmpty()&&delete this.dispatchers[t.stream()])}isEmpty(){return 0==Object.keys(this.dispatchers).length}getEPDs(t){let e=this.dispatchers[t];return void 0!==e?e.getAll():[]}getStreams(){return Object.keys(this.dispatchers)}startGetingDeltaSnapshot(t){t.registerSnapshotHandler(this)}stopGetingDeltaSnapshot(t){t.deRegisterSnapshotHandler(this)}process(t,e){if(this.sportsFeedGroup.isIndicatorMessage(e.msgType())){let s=new IndicatorWrapper(e,this,t);this.submitForProcess(s)}else{let s=new PartialSnapshotWrapper(e,this,t);this.submitForProcess(s)}}getSportsFeedGrp(){return this.sportsFeedGroup}generateFull(t){throw new Error("Method not implemented.")}generatePartial(t){throw new Error("Method not implemented.")}}exports.AbstractEPG=AbstractEPG;let RelayEPG=class extends AbstractEPG{constructor(t){super(t),this._sportsFeedGroup=t}submitForProcess(t){t.process()}onException(t){return console.error("Exception when dispatching snapshots to EPDs from RelayEPG. ",t),null}generateFull(t){let e=t.getFullSnapshot();return[new data_structure_1.OutgoingImpl(this._sportsFeedGroup.FULLSNAPSHOT_START(),new Object),new data_structure_1.DeltaOutgoingImpl(this._sportsFeedGroup.DATA_RESET(),e,e,data_structure_1.IndexedSnapshotImpl.EMPTY_SNAPSHOT),new data_structure_1.DeltaOutgoingImpl(this._sportsFeedGroup.DATA_INSERT_MATCH(),e,e,data_structure_1.IndexedSnapshotImpl.EMPTY_SNAPSHOT),new data_structure_1.DeltaOutgoingImpl(this._sportsFeedGroup.DATA_INSERT_EVENT(),e,e,data_structure_1.IndexedSnapshotImpl.EMPTY_SNAPSHOT),new data_structure_1.DeltaOutgoingImpl(this._sportsFeedGroup.DATA_INSERT_ODD(),e,e,data_structure_1.IndexedSnapshotImpl.EMPTY_SNAPSHOT),new data_structure_1.OutgoingImpl(this._sportsFeedGroup.FULLSNAPSHOT_END(),new Object)]}generatePartial(t){let e=t.delta();return"TTLOutgoing"==e.constructor.name?this.generateTtl(e):[e]}generateTtl(t){if(this.isSameFormat(t.msgType(),this._sportsFeedGroup.ADMIN_REFRESH()))return[];return t.getTtlType()==core_1.TTLType.REMOVE?[t]:this.generateTtlRestore(t)}generateTtlRestore(t){return[new data_structure_1.DeltaOutgoingImpl(this._sportsFeedGroup.DATA_INSERT_MATCH(),t.delta(),t.delta(),data_structure_1.IndexedSnapshotImpl.EMPTY_SNAPSHOT),new data_structure_1.DeltaOutgoingImpl(this._sportsFeedGroup.DATA_INSERT_EVENT(),t.delta(),t.delta(),data_structure_1.IndexedSnapshotImpl.EMPTY_SNAPSHOT),new data_structure_1.DeltaOutgoingImpl(this._sportsFeedGroup.DATA_INSERT_ODD(),t.delta(),t.delta(),data_structure_1.IndexedSnapshotImpl.EMPTY_SNAPSHOT)]}isSameFormat(t,e){return t.instanceClass()==e.instanceClass()&&t.constructor.name==e.constructor.name}};RelayEPG=__decorate([(0,injection_js_1.Injectable)(),__metadata("design:paramtypes",[message_class_1.SportsFeedMessageGroup])],RelayEPG),exports.RelayEPG=RelayEPG;
|
package/lib/index.js
CHANGED
|
@@ -1,27 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./basketball_codec"), exports);
|
|
18
|
-
__exportStar(require("./client"), exports);
|
|
19
|
-
__exportStar(require("./codec"), exports);
|
|
20
|
-
__exportStar(require("./core"), exports);
|
|
21
|
-
__exportStar(require("./data_structure"), exports);
|
|
22
|
-
__exportStar(require("./dispatch"), exports);
|
|
23
|
-
__exportStar(require("./message_class"), exports);
|
|
24
|
-
__exportStar(require("./module"), exports);
|
|
25
|
-
__exportStar(require("./receive"), exports);
|
|
26
|
-
__exportStar(require("./soccer_codec"), exports);
|
|
27
|
-
__exportStar(require("./tennis_codec"), exports);
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var _=Object.getOwnPropertyDescriptor(r,t);_&&!("get"in _?!r.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,_)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),__exportStar=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||__createBinding(r,e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./basketball_codec"),exports),__exportStar(require("./client"),exports),__exportStar(require("./codec"),exports),__exportStar(require("./core"),exports),__exportStar(require("./data_structure"),exports),__exportStar(require("./dispatch"),exports),__exportStar(require("./message_class"),exports),__exportStar(require("./module"),exports),__exportStar(require("./receive"),exports),__exportStar(require("./soccer_codec"),exports),__exportStar(require("./tennis_codec"),exports);
|