@aj-shadow/actorjs-documentation-text 0.0.0-aj-beta.221
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/.gitattributes +26 -0
- package/Documentation/Document-global-Be-100-more-efficient.txt +31 -0
- package/Documentation/Document-global-actorjs-trigger-mock-and-intercept-anything.txt +21 -0
- package/Documentation/Document-global-advanced-visualization.txt +28 -0
- package/Documentation/Document-global-debugging.txt +4 -0
- package/Documentation/Document-global-divide-and-reuse.txt +37 -0
- package/Documentation/Document-global-general-separation.txt +2 -0
- package/Documentation/Document-global-markup-anchor.txt +6 -0
- package/Documentation/Document-global-markup-api-status.txt +39 -0
- package/Documentation/Document-global-markup-chart-line.txt +18 -0
- package/Documentation/Document-global-markup-documentation-status.txt +39 -0
- package/Documentation/Document-global-markup-documentation.txt +72 -0
- package/Documentation/Document-global-markup-embed.txt +6 -0
- package/Documentation/Document-global-markup-flowchart.txt +88 -0
- package/Documentation/Document-global-markup-html.txt +122 -0
- package/Documentation/Document-global-markup-ie.txt +18 -0
- package/Documentation/Document-global-markup-image.txt +55 -0
- package/Documentation/Document-global-markup-lab.txt +63 -0
- package/Documentation/Document-global-markup-markup.txt +21 -0
- package/Documentation/Document-global-markup-navigation.txt +25 -0
- package/Documentation/Document-global-markup-node-diagram.txt +163 -0
- package/Documentation/Document-global-markup-note.txt +6 -0
- package/Documentation/Document-global-markup-ref.txt +6 -0
- package/Documentation/Document-global-markup-sequence-diagram.txt +215 -0
- package/Documentation/Document-global-markup-state-machine.txt +121 -0
- package/Documentation/Document-global-markup-table.txt +34 -0
- package/Documentation/Document-global-navigation-pane.txt +3 -0
- package/Documentation/Document-global-navigation.txt +2 -0
- package/Documentation/Document-global-specialized-javascript-editors.txt +2 -0
- package/Documentation/Document-global-stacks-connection.txt +2 -0
- package/Documentation/Document-global-stacks-server.txt +2 -0
- package/Documentation/Document-global-test-environment-overview.txt +15 -0
- package/Documentation/Document-global-the-architecture.txt +51 -0
- package/Documentation/Document-global-the-development-environment.txt +5 -0
- package/Documentation/Document-global-the-test-environment.txt +15 -0
- package/Documentation/Document-global-think-ahead.txt +35 -0
- package/Documentation/Document-global-thinking-in-actors-unlimited.txt +1 -0
- package/Documentation/Document-global-what-is-a-stack.txt +2 -0
- package/Documentation/Document-global-why-actorjs.txt +52 -0
- package/Documentation/Document-global-why-actors-unlimited.txt +182 -0
- package/Documentation/Document-global-x-test-case-tool.txt +2 -0
- package/Documentation/Navigation-Documentation-actorjs-global.txt +372 -0
- package/Documentation/Navigation-Documentation-actorsite-global.txt +363 -0
- package/Documentation/abstractions/Document-global-addressing.txt +81 -0
- package/Documentation/abstractions/Document-global-configuration-floor.txt +2 -0
- package/Documentation/abstractions/Document-global-content.txt +3 -0
- package/Documentation/abstractions/Document-global-functions-test.txt +4 -0
- package/Documentation/abstractions/Document-global-functions-unde-test.txt +2 -0
- package/Documentation/abstractions/Document-global-load-test.txt +3 -0
- package/Documentation/abstractions/Document-global-repo.txt +79 -0
- package/Documentation/abstractions/Document-global-shared-data.txt +5 -0
- package/Documentation/abstractions/Document-global-system-to-test.txt +2 -0
- package/Documentation/abstractions/Document-global-system-under-test.txt +3 -0
- package/Documentation/abstractions/Document-global-test-data.txt +251 -0
- package/Documentation/abstractions/Document-global-test-suite.txt +37 -0
- package/Documentation/abstractions/Document-global-verification-data.txt +103 -0
- package/Documentation/abstractions/actor/Document-global-actor-condition.txt +74 -0
- package/Documentation/abstractions/actor/Document-global-actor-local.txt +44 -0
- package/Documentation/abstractions/actor/Document-global-actor-originating.txt +100 -0
- package/Documentation/abstractions/actor/Document-global-actor-proxy.txt +119 -0
- package/Documentation/abstractions/actor/Document-global-actor-terminating.txt +101 -0
- package/Documentation/abstractions/actor/Document-global-actor.txt +90 -0
- package/Documentation/abstractions/actor/Document-global-execution-states.txt +21 -0
- package/Documentation/abstractions/actorpart/Document-global-actorpart.txt +2 -0
- package/Documentation/abstractions/stack/Document-global-client-connection.txt +3 -0
- package/Documentation/abstractions/stack/Document-global-connection.txt +3 -0
- package/Documentation/abstractions/stack/Document-global-decoder.txt +3 -0
- package/Documentation/abstractions/stack/Document-global-encoder.txt +3 -0
- package/Documentation/abstractions/stack/Document-global-message.txt +4 -0
- package/Documentation/abstractions/stack/Document-global-server-connection.txt +3 -0
- package/Documentation/abstractions/stack/Document-global-stack.txt +12 -0
- package/Documentation/abstractions/stack/Document-global-worker.txt +3 -0
- package/Documentation/abstractions/test-case/Document-global-phases.txt +30 -0
- package/Documentation/abstractions/test-case/Document-global-test-case-result.txt +23 -0
- package/Documentation/abstractions/test-case/Document-global-test-case.txt +199 -0
- package/Documentation/actor-api/Document-global-actor-part.txt +7 -0
- package/Documentation/actor-api/Document-global-actor.txt +375 -0
- package/Documentation/actor-api/Document-global-async.txt +176 -0
- package/Documentation/actor-api/Document-global-client-stack.txt +215 -0
- package/Documentation/actor-api/Document-global-content.txt +106 -0
- package/Documentation/actor-api/Document-global-logger.txt +426 -0
- package/Documentation/actor-api/Document-global-process.txt +7 -0
- package/Documentation/actor-api/Document-global-server-stack.txt +213 -0
- package/Documentation/actor-api/Document-global-shared-data.txt +259 -0
- package/Documentation/actor-api/Document-global-test-data.txt +816 -0
- package/Documentation/actor-api/Document-global-timer.txt +70 -0
- package/Documentation/actor-api/Document-global-verification-data.txt +624 -0
- package/Documentation/connection-worker-api/Document-global-logger.txt +3 -0
- package/Documentation/documentation-references.json +199 -0
- package/Documentation/embedded/Document-global-test-case-result.txt +10 -0
- package/Documentation/howto/Document-global-create-actor.txt +1 -0
- package/Documentation/howto/Document-global-create-stack.txt +1 -0
- package/Documentation/howto/Document-global-create-test-case.txt +1 -0
- package/Documentation/howto/Document-global-create-test-suite.txt +1 -0
- package/Documentation/howto/Document-global-define-addresses.txt +1 -0
- package/Documentation/howto/Document-global-define-fut.txt +1 -0
- package/Documentation/howto/Document-global-define-sut.txt +16 -0
- package/Documentation/howto/Document-global-full-workflow.txt +143 -0
- package/Documentation/howto/Document-global-normal-workflow.txt +58 -0
- package/Documentation/howto/Document-global-prerequisites.txt +8 -0
- package/Documentation/howto/prerequisites/Document-global-install-actorjs.txt +64 -0
- package/Documentation/howto/prerequisites/Document-global-install-git.txt +26 -0
- package/Documentation/howto/prerequisites/Document-global-install-nodejs.txt +19 -0
- package/Documentation/markup/Document-global-markup-test-case.txt +6 -0
- package/Documentation/markup/Document-global-markup-test-suite.txt +13 -0
- package/Documentation/markup/embed/Document-global-inner_markup_tc.txt +164 -0
- package/Documentation/nodejs-api/Document-global-fs.txt +7 -0
- package/Documentation/stack-api/Document-global-ascii-dictionary.txt +108 -0
- package/Documentation/stack-api/Document-global-binary-log.txt +91 -0
- package/Documentation/stack-api/Document-global-bit-byte.txt +80 -0
- package/Documentation/stack-api/Document-global-content-base.txt +169 -0
- package/Documentation/stack-api/Document-global-ip-log.txt +101 -0
- package/Documentation/stack-api/Document-global-log-inner.txt +152 -0
- package/Documentation/stack-api/Document-global-log-part-error.txt +12 -0
- package/Documentation/stack-api/Document-global-log-part-ref.txt +80 -0
- package/Documentation/stack-api/Document-global-log-part-text.txt +81 -0
- package/Documentation/tools/Document-global-actors.txt +196 -0
- package/Documentation/tools/Document-global-addressing.txt +38 -0
- package/Documentation/tools/Document-global-content.txt +1 -0
- package/Documentation/tools/Document-global-global-test-data.txt +197 -0
- package/Documentation/tools/Document-global-stacks.txt +1 -0
- package/Documentation/tools/Document-global-test-case-analyze.txt +3 -0
- package/Documentation/tools/Document-global-test-case-debug.txt +16 -0
- package/Documentation/tools/Document-global-test-case-definition.txt +37 -0
- package/Documentation/tools/Document-global-test-case-execution.txt +28 -0
- package/Documentation/tools/Document-global-test-case-log.txt +95 -0
- package/Documentation/tools/Document-global-test-case-sequence-diagram.txt +17 -0
- package/Documentation/tools/Document-global-test-case-specification.txt +3 -0
- package/Documentation/tools/Document-global-test-cases.txt +11 -0
- package/Documentation/tools/Document-global-tool-test-suite.txt +202 -0
- package/Education/Document-global-add-your-first-addresses.txt +75 -0
- package/Education/Document-global-define-your-first-sut.txt +18 -0
- package/Education/Document-global-make-your-first-actors.txt +35 -0
- package/Education/Document-global-make-your-first-test-case.txt +43 -0
- package/Education/Document-global-make-your-first-test-suite.txt +29 -0
- package/Education/Document-global-share-your-work.txt +35 -0
- package/Education/Navigation-Education-actorjs-global.txt +31 -0
- package/LICENSE.txt +96 -0
- package/README.md +5 -0
- package/Workshop/Document-global-actordemo-image-ai.txt +5 -0
- package/Workshop/Document-global-actordemo-login.txt +10 -0
- package/Workshop/Document-global-actordemo-site.txt +3 -0
- package/Workshop/Document-global-actordemo-start.txt +5 -0
- package/Workshop/Document-global-actordemo-the-architecture.txt +27 -0
- package/Workshop/Document-global-introduction-actor.txt +84 -0
- package/Workshop/Document-global-introduction-actorjs.txt +42 -0
- package/Workshop/Document-global-introduction-stack.txt +25 -0
- package/Workshop/Document-global-introduction-system-under-test.txt +102 -0
- package/Workshop/Document-global-introduction-test-case.txt +50 -0
- package/Workshop/Document-global-introduction-test-suite.txt +31 -0
- package/Workshop/Document-global-login-with-puppeter.txt +45 -0
- package/Workshop/Document-global-mock-with-http.txt +83 -0
- package/Workshop/Document-global-mock-with-icap.txt +94 -0
- package/Workshop/Document-global-prerequisites-actorJs.txt +18 -0
- package/Workshop/Document-global-prerequisites-actordemo.txt +15 -0
- package/Workshop/Document-global-trigger-with-http.txt +93 -0
- package/Workshop/Document-global-trigger-with-puppeter.txt +49 -0
- package/Workshop/Navigation-Workshop-actorjs-global.txt +86 -0
- package/npm-shrinkwrap.json +13 -0
- package/package.json +10 -0
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
# **Logger API**
|
|
2
|
+
[[API-STATUS=STABLE, ]]
|
|
3
|
+
[[DOC-STATUS=MOSTLY, ]]
|
|
4
|
+
|
|
5
|
+
[[NOTE={"guid":"4456444f-8ed7-4ea0-b144-59d08f672233"}]]
|
|
6
|
+
[[ANCHOR={"id":"cd34fd91-ae8f-4d75-8296-72d8a98ac233","visible":true}]]
|
|
7
|
+
## **Description**
|
|
8
|
+
[[REF=, ABS_Actor]]s can use this API to generate logs.
|
|
9
|
+
|
|
10
|
+
Logger API implementation starts in [[REF=, CODE_Logger]].
|
|
11
|
+
|
|
12
|
+
[[NOTE={"guid":"0fb3431f-166f-4e7a-93ec-832cd486a878"}]]
|
|
13
|
+
[[ANCHOR={"id":"content-api-methods","visible":true}]]
|
|
14
|
+
## **API Methods**
|
|
15
|
+
* **[logDebug](#logger-api-log-debug)**
|
|
16
|
+
* **[logEngine](#logger-api-log-engine)**
|
|
17
|
+
* **[logError](#logger-api-log-error)**
|
|
18
|
+
* **[logIp](#logger-api-log-ip)** `ToDo`
|
|
19
|
+
* **[logGui](#logger-api-log-gui)** `ToDo`
|
|
20
|
+
* **[logTestData](#logger-api-log-test-data)**
|
|
21
|
+
* **[logVerifyFailure](#logger-api-log-verify-failure)**
|
|
22
|
+
* **[logVerifySuccess](#logger-api-log-verify-success)**
|
|
23
|
+
* **[logWarning](#logger-api-log-warning)**
|
|
24
|
+
|
|
25
|
+
***
|
|
26
|
+
[[NOTE={"guid":"d793886d-39ce-4868-a562-d3d1f130f933"}]]
|
|
27
|
+
[[ANCHOR={"id":"logger-api-log-debug","visible":true}]]
|
|
28
|
+
### **logDebug**
|
|
29
|
+
```
|
|
30
|
+
this.logDebug(message[, group[, guid[, depth=0]]])
|
|
31
|
+
```
|
|
32
|
+
Generates a debug log.
|
|
33
|
+
|
|
34
|
+
[[NOTE={"guid":"1f67cef5-6bde-4e33-a79d-10932de2a7b6"}]]
|
|
35
|
+
[[ANCHOR={"id":"d7c68fbe-919a-47dd-862a-8b96a25f21a3","visible":true}]]
|
|
36
|
+
#### **Method Description**
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
[[NOTE={"guid":"9358cef0-7080-4a01-82e7-c8acccc70ad0"}]]
|
|
40
|
+
[[ANCHOR={"id":"b508de21-8320-4234-a7aa-fc17572813e0","visible":true}]]
|
|
41
|
+
```table
|
|
42
|
+
Config(classHeading: )
|
|
43
|
+
|
|
44
|
+
|Parameters |
|
|
45
|
+
|Name |Type |Default |Description |
|
|
46
|
+
|message|[[REF=,MDN_string]] | [[REF=,MDN_Function]]| |The log as a [[REF=,MDN_string]] or a [[REF=,MDN_Function]] returning the log as a [[REF=,MDN_string]]. |
|
|
47
|
+
|group |[[REF=,MDN_string]] |undefined|A name used for filtering of logs. `Filter on log groups not implemented yet.` |
|
|
48
|
+
|guid |[[REF=,MDN_string]] |undefined|A unique id, preferably a GUID, used for optimization. The GUID is used to access a cached stack. |
|
|
49
|
+
|depth |[[REF=,MDN_number]] |0 |Move down depth steps in stack when choosing the **file name** to refer to in the log. `Values other than default mostly for use within ActorJs.`|
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
[[NOTE={"guid":"5def7ff0-37ef-4946-86e9-164ee22dd421"}]]
|
|
53
|
+
[[ANCHOR={"id":"f305036e-8290-444c-9772-14076ece13d1","visible":true}]]
|
|
54
|
+
#### **Example logDebug**
|
|
55
|
+
|
|
56
|
+
```javascript
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
this.logDebug('Demo debug log');
|
|
61
|
+
this.logDebug(() => 'Demo debug log');
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```object
|
|
66
|
+
|
|
67
|
+
[log](Debug, Mon. 03 Oct 2016 22:52:05 GMT : 901.764, DemoLogLocal[1], Demo success log., Actors-global.demo.log.DemoLogLocal.js)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
[[NOTE={"guid":"30dce410-e7f9-4036-bd47-e355b9653102"}]]
|
|
71
|
+
[[ANCHOR={"id":"7774e2f8-d5c4-4b7e-a361-eab3ab947618","visible":true}]]
|
|
72
|
+
#### **Test Cases logDebug**
|
|
73
|
+
+ [DemoLog001](/../test-cases/Actor/Demo/DemoLog001)
|
|
74
|
+
|
|
75
|
+
***
|
|
76
|
+
[[NOTE={"guid":"1ab1abbd-1393-4b91-b1f9-be3101774bb5"}]]
|
|
77
|
+
[[ANCHOR={"id":"logger-api-log-engine","visible":true}]]
|
|
78
|
+
### **logEngine**
|
|
79
|
+
```
|
|
80
|
+
this.logEngine(message[, group[, guid[, depth=0]]])
|
|
81
|
+
```
|
|
82
|
+
Generates an engine log. `Mostly used internally.`
|
|
83
|
+
|
|
84
|
+
[[NOTE={"guid":"3de925b5-f11f-47c5-9082-9421789c2157"}]]
|
|
85
|
+
[[ANCHOR={"id":"37ef95a9-5c68-4f4b-9679-01b3481bdc26","visible":true}]]
|
|
86
|
+
#### **Method Description**
|
|
87
|
+
|
|
88
|
+
[[NOTE={"guid":"c011f07e-9911-4201-a3db-bd366d91c116"}]]
|
|
89
|
+
[[ANCHOR={"id":"efbee403-eec6-42fe-818c-e0d861cd9262","visible":true}]]
|
|
90
|
+
```table
|
|
91
|
+
Config(classHeading: )
|
|
92
|
+
|
|
93
|
+
|Parameters |
|
|
94
|
+
|Name |Type |Default |Description |
|
|
95
|
+
|message|[[REF=,MDN_string]] | [[REF=,MDN_Function]]| |The log as a [[REF=,MDN_string]] or a [[REF=,MDN_Function]] returning the log as a [[REF=,MDN_string]]. |
|
|
96
|
+
|group |[[REF=,MDN_string]] |undefined|A name used for filtering of logs. `Filter on log groups not implemented yet.` |
|
|
97
|
+
|guid |[[REF=,MDN_string]] |undefined|A unique id, preferably a GUID, used for optimization. The GUID is used to access a cached stack. |
|
|
98
|
+
|depth |[[REF=,MDN_number]] |0 |Move down depth steps in stack when choosing the **file name** to refer to in the log. `Values other than default mostly for use within ActorJs.`|
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
[[NOTE={"guid":"5245a83c-2558-4d8e-9c68-f4c12eddc69c"}]]
|
|
102
|
+
[[ANCHOR={"id":"1923f805-5d5a-4e2d-a8d2-fc5a5d404f4c","visible":true}]]
|
|
103
|
+
#### **Example logEngine**
|
|
104
|
+
|
|
105
|
+
```javascript
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
this.logEngine('Demo engine log');
|
|
110
|
+
this.logEngine(() => 'Demo engine log');
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
```object
|
|
115
|
+
|
|
116
|
+
[log](Engine, Mon. 03 Oct 2016 22:52:05 GMT : 901.764, DemoLogLocal[1], Demo engine log., Actors-global.demo.log.DemoLogLocal.js)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
[[NOTE={"guid":"cab0458a-8266-48c3-ba40-74804dab60a1"}]]
|
|
120
|
+
[[ANCHOR={"id":"eaa83882-92bc-4538-926a-eb7c3ce20e66","visible":true}]]
|
|
121
|
+
#### **Test Cases logEngine**
|
|
122
|
+
+ [DemoLog001](/../test-cases/Actor/Demo/DemoLog001)
|
|
123
|
+
|
|
124
|
+
***
|
|
125
|
+
[[NOTE={"guid":"5c1589dc-2d93-4248-a95e-ab9923c702bd"}]]
|
|
126
|
+
[[ANCHOR={"id":"logger-api-log-error","visible":true}]]
|
|
127
|
+
### **logError**
|
|
128
|
+
```
|
|
129
|
+
this.logError(message[, group[, guid[, depth=0]]])
|
|
130
|
+
```
|
|
131
|
+
Generates an error log.
|
|
132
|
+
[[NOTE={"guid":"e69215ce-ff8a-4a77-8646-f04f8184bad5"}]]
|
|
133
|
+
[[ANCHOR={"id":"89e38ba7-1255-439a-a928-9526273e4bc9","visible":true}]]
|
|
134
|
+
#### **Method Description**
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
[[NOTE={"guid":"14e06130-a63d-4aa1-907f-f11f1e1cc8a6"}]]
|
|
138
|
+
[[ANCHOR={"id":"3652a588-5a66-4d26-8074-1fb1d696c87f","visible":true}]]
|
|
139
|
+
```table
|
|
140
|
+
Config(classHeading: )
|
|
141
|
+
|
|
142
|
+
|Parameters |
|
|
143
|
+
|Name |Type |Default |Description |
|
|
144
|
+
|errOrMsg|[[REF=,MDN_string]] | [[REF=,MDN_Function]] | [[REF=,NODEJS_Error]]| |The log as a [[REF=,MDN_string]] or an [[REF=,NODEJS_Error]] or a [[REF=,MDN_Function]] returning the log as a [[REF=,MDN_string]] or an [[REF=,NODEJS_Error]].|
|
|
145
|
+
|guid |[[REF=,MDN_string]] |undefined|A unique id, preferably a GUID, used for optimization. The GUID is used to access a cached stack. |
|
|
146
|
+
|depth |[[REF=,MDN_number]] |0 |Move down depth steps in stack when choosing the **file name** to refer to in the log. `Values other than default mostly for use within ActorJs.`|
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
[[NOTE={"guid":"c0355abb-c0b0-4bb4-999b-71ee04e26a04"}]]
|
|
150
|
+
[[ANCHOR={"id":"f5533ff8-f970-4dd8-b727-3f33cad45e92","visible":true}]]
|
|
151
|
+
#### **Example logError**
|
|
152
|
+
|
|
153
|
+
```javascript
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
this.logError('Demo success log');
|
|
158
|
+
this.logError(() => 'Demo success log');
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
```object
|
|
163
|
+
|
|
164
|
+
[log](Error, Mon. 03 Oct 2016 22:52:05 GMT : 901.764, DemoLogLocal[1], Demo error log., Actors-global.demo.log.DemoLogLocal.js)
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
[[NOTE={"guid":"3b098a91-a933-46f0-bd38-c038f9f7ba25"}]]
|
|
168
|
+
[[ANCHOR={"id":"6c7c1565-6715-4f8f-869a-70cf367cf72a","visible":true}]]
|
|
169
|
+
#### **Test Cases logError**
|
|
170
|
+
+ [DemoLog001](/../test-cases/Actor/Demo/DemoLog001)
|
|
171
|
+
|
|
172
|
+
***
|
|
173
|
+
[[NOTE={"guid":"5714b5dd-3753-425f-b746-2f3e46eff518"}]]
|
|
174
|
+
[[ANCHOR={"id":"logger-api-log-ip","visible":true}]]
|
|
175
|
+
### **logIp `ToDo`**
|
|
176
|
+
```
|
|
177
|
+
this.logIp(message[, group[, guid[, depth=0]]])
|
|
178
|
+
```
|
|
179
|
+
Generates an IP log. `Mostly used internally.`
|
|
180
|
+
|
|
181
|
+
[[NOTE={"guid":"216ece7c-54a6-4d96-b35c-ac2f6983eee8"}]]
|
|
182
|
+
[[ANCHOR={"id":"67871037-2510-4806-bf8e-7ae940665431","visible":true}]]
|
|
183
|
+
#### **Method Description**
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
[[NOTE={"guid":"0f8b3fb4-60e5-429a-b24d-2bb65d73f330"}]]
|
|
187
|
+
[[ANCHOR={"id":"940e4a54-6f08-4736-853c-8e60c0abbb8d","visible":true}]]
|
|
188
|
+
#### **Example logIp**
|
|
189
|
+
|
|
190
|
+
```object
|
|
191
|
+
|
|
192
|
+
[log](IP, Mon. 03 Oct 2016 22:52:05 GMT : 901.764, DemoLogLocal[1], Demo ip log., Actors-global.demo.log.DemoLogLocal.js)
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
[[NOTE={"guid":"edad4216-b1fe-4f92-ac13-6b588c9c86bd"}]]
|
|
196
|
+
[[ANCHOR={"id":"c9c5b244-ad18-443b-af9c-a3c7266cd220","visible":true}]]
|
|
197
|
+
#### **Test Cases logIp**
|
|
198
|
+
+ [DemoLog001](/../test-cases/Actor/Demo/DemoLog001)
|
|
199
|
+
|
|
200
|
+
***
|
|
201
|
+
[[NOTE={"guid":"a1c7e317-b4d6-438e-9036-5ac94e208841"}]]
|
|
202
|
+
[[ANCHOR={"id":"logger-api-log-gui","visible":true}]]
|
|
203
|
+
### **logGui `ToDo`**
|
|
204
|
+
```
|
|
205
|
+
this.logGui(message[, group[, guid[, depth=0]]])
|
|
206
|
+
```
|
|
207
|
+
Generates a GUI log. `Mostly used internally.`
|
|
208
|
+
|
|
209
|
+
[[NOTE={"guid":"c94d2396-b08f-401c-9976-5e6b5d77cb6c"}]]
|
|
210
|
+
[[ANCHOR={"id":"e5d86fe9-ebc9-413b-aec9-5f47a41a85e3","visible":true}]]
|
|
211
|
+
#### **Method Description**
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
[[NOTE={"guid":"72973e33-7d10-435e-8b30-3884f413ce7e"}]]
|
|
215
|
+
[[ANCHOR={"id":"7cb44d32-84d7-485c-afc9-d9709857c87f","visible":true}]]
|
|
216
|
+
#### **Example logGui**
|
|
217
|
+
|
|
218
|
+
```object
|
|
219
|
+
|
|
220
|
+
[log](GUI, Mon. 03 Oct 2016 22:52:05 GMT : 901.764, DemoLogLocal[1], Demo gui log., Actors-global.demo.log.DemoLogLocal.js)
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
[[NOTE={"guid":"d3508306-0ee1-413c-8ee6-9c7c0b1ea8dd"}]]
|
|
224
|
+
[[ANCHOR={"id":"ef3b5be4-0a7d-44ea-acbf-2d8cca2f090c","visible":true}]]
|
|
225
|
+
#### **Test Cases logGui**
|
|
226
|
+
+ [DemoLog001](/../test-cases/Actor/Demo/DemoLog001)
|
|
227
|
+
|
|
228
|
+
***
|
|
229
|
+
[[NOTE={"guid":"eb7ed8d2-3ca8-468a-8447-66168718c01d"}]]
|
|
230
|
+
[[ANCHOR={"id":"logger-api-log-test-data","visible":true}]]
|
|
231
|
+
### **logTestData**
|
|
232
|
+
```
|
|
233
|
+
this.logTestData(message[, group[, guid[, depth=0]]])
|
|
234
|
+
```
|
|
235
|
+
Generates a test data log.
|
|
236
|
+
|
|
237
|
+
[[NOTE={"guid":"3e6350b7-432d-4078-a7c7-f8b86604c55b"}]]
|
|
238
|
+
[[ANCHOR={"id":"619c3fcd-0d30-417b-8edd-cd74a9da3c52","visible":true}]]
|
|
239
|
+
#### **Method Description**
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
[[NOTE={"guid":"3d648e2a-539b-400b-bdef-0f1966999130"}]]
|
|
243
|
+
[[ANCHOR={"id":"2c8273af-47a8-4cf3-b6ad-aeb9b4db8b7c","visible":true}]]
|
|
244
|
+
```table
|
|
245
|
+
Config(classHeading: )
|
|
246
|
+
|
|
247
|
+
|Parameters |
|
|
248
|
+
|Name |Type |Default |Description |
|
|
249
|
+
|message|[[REF=,MDN_string]] | [[REF=,MDN_Function]]| |The log as a [[REF=,MDN_string]] or a [[REF=,MDN_Function]] returning the log as a [[REF=,MDN_string]]. |
|
|
250
|
+
|group |[[REF=,MDN_string]] |undefined|A name used for filtering of logs. `Filter on log groups not implemented yet.` |
|
|
251
|
+
|guid |[[REF=,MDN_string]] |undefined|A unique id, preferably a GUID, used for optimization. The GUID is used to access a cached stack. |
|
|
252
|
+
|depth |[[REF=,MDN_number]] |0 |Move down depth steps in stack when choosing the **file name** to refer to in the log. `Values other than default mostly for use within ActorJs.`|
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
[[NOTE={"guid":"d0efe7e8-cd76-4a82-bed9-efbb257ceb76"}]]
|
|
256
|
+
[[ANCHOR={"id":"026b950a-4db7-4d92-bcc9-8a44c1f4cc1e","visible":true}]]
|
|
257
|
+
#### **Example logTestData**
|
|
258
|
+
|
|
259
|
+
```javascript
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
this.logTestData('Demo test data log');
|
|
264
|
+
this.logTestData(() => 'Demo test data log');
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
```object
|
|
269
|
+
|
|
270
|
+
[log](TestData, Mon. 03 Oct 2016 22:52:05 GMT : 901.764, DemoLogLocal[1], Demo test data log., Actors-global.demo.log.DemoLogLocal.js)
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
[[NOTE={"guid":"4fbd3f4f-07fc-4392-b801-c9845264e222"}]]
|
|
274
|
+
[[ANCHOR={"id":"32126e75-a1be-45e6-998a-b78652f11c74","visible":true}]]
|
|
275
|
+
#### **Test Cases logTestData**
|
|
276
|
+
+ [DemoLog001](/../test-cases/Actor/Demo/DemoLog001)
|
|
277
|
+
|
|
278
|
+
***
|
|
279
|
+
[[NOTE={"guid":"74421d41-c437-4b53-8d2a-a2bc16b73000"}]]
|
|
280
|
+
[[ANCHOR={"id":"logger-api-log-verify-failure","visible":true}]]
|
|
281
|
+
### **logVerifyFailure**
|
|
282
|
+
```
|
|
283
|
+
this.logVerifyFailure(message[, group[, guid[, depth=0]]])
|
|
284
|
+
```
|
|
285
|
+
Generates a verify failure log. `Mostly used internally.`
|
|
286
|
+
|
|
287
|
+
[[NOTE={"guid":"b91cd4a6-33bc-47a0-896f-86fbdaea4bed"}]]
|
|
288
|
+
[[ANCHOR={"id":"db9b2053-62a5-4848-a0d5-3042424d054a","visible":true}]]
|
|
289
|
+
#### **Method Description**
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
[[NOTE={"guid":"5d05ff4c-7e2b-4d9b-901e-e9d68d44856e"}]]
|
|
293
|
+
[[ANCHOR={"id":"aa104ce9-b8b9-471b-b74b-51aea2281c2f","visible":true}]]
|
|
294
|
+
```table
|
|
295
|
+
Config(classHeading: )
|
|
296
|
+
|
|
297
|
+
|Parameters |
|
|
298
|
+
|Name |Type |Default |Description |
|
|
299
|
+
|message|[[REF=,MDN_string]] | [[REF=,MDN_Function]]| |The log as a [[REF=,MDN_string]] or a [[REF=,MDN_Function]] returning the log as a [[REF=,MDN_string]]. |
|
|
300
|
+
|guid |[[REF=,MDN_string]] |undefined|A unique id, preferably a GUID, used for optimization. The GUID is used to access a cached stack. |
|
|
301
|
+
|depth |[[REF=,MDN_number]] |0 |Move down depth steps in stack when choosing the **file name** to refer to in the log. `Values other than default mostly for use within ActorJs.`|
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
[[NOTE={"guid":"66fdab86-40a0-4fdf-af9b-d328e280a0f2"}]]
|
|
305
|
+
[[ANCHOR={"id":"52b067cd-edf2-4f68-a820-a0dca14f6e6b","visible":true}]]
|
|
306
|
+
#### **Example logVerifyFailure**
|
|
307
|
+
|
|
308
|
+
```javascript
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
this.logVerifyFailure('Demo verify failure log');
|
|
313
|
+
this.logVerifyFailure(() => 'Demo verify failure log');
|
|
314
|
+
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
```object
|
|
318
|
+
|
|
319
|
+
[log](Failure, Mon. 03 Oct 2016 22:52:05 GMT : 901.764, DemoLogLocal[1], Demo verify success log., Actors-global.demo.log.DemoLogLocal.js)
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
[[NOTE={"guid":"f34b0ea9-904f-4905-b230-6d6dd92f47b2"}]]
|
|
323
|
+
[[ANCHOR={"id":"a1827cec-b614-4a9a-ade7-f95e38133693","visible":true}]]
|
|
324
|
+
#### **Test Cases logVerifyFailure**
|
|
325
|
+
+ [DemoLog001](/../test-cases/Actor/Demo/DemoLog001)
|
|
326
|
+
|
|
327
|
+
***
|
|
328
|
+
|
|
329
|
+
[[NOTE={"guid":"8dc4fa1a-488d-4ff3-b473-19c00b2bb8df"}]]
|
|
330
|
+
[[ANCHOR={"id":"logger-api-log-verify-success","visible":true}]]
|
|
331
|
+
### **logVerifySuccess**
|
|
332
|
+
```
|
|
333
|
+
this.logVerifySuccess(message[, group[, guid[, depth=0]]])
|
|
334
|
+
```
|
|
335
|
+
Generate a verify success log. `Mostly used internally.`
|
|
336
|
+
[[NOTE={"guid":"f4209dd6-f972-4270-8b91-820061c90864"}]]
|
|
337
|
+
[[ANCHOR={"id":"36c906e3-20dc-4474-9c7d-e14755131c16","visible":true}]]
|
|
338
|
+
#### **Method Description**
|
|
339
|
+
|
|
340
|
+
[[NOTE={"guid":"dc508ea6-ef14-4e2c-940c-cdf2f23ac954"}]]
|
|
341
|
+
[[ANCHOR={"id":"9b522d95-c026-418e-8d19-ba44386b521f","visible":true}]]
|
|
342
|
+
```table
|
|
343
|
+
Config(classHeading: )
|
|
344
|
+
|
|
345
|
+
|Parameters |
|
|
346
|
+
|Name |Type |Default |Description |
|
|
347
|
+
|message|[[REF=,MDN_string]] | [[REF=,MDN_Function]]| |The log as a [[REF=,MDN_string]] or a [[REF=,MDN_Function]] returning the log as a [[REF=,MDN_string]]. |
|
|
348
|
+
|guid |[[REF=,MDN_string]] |undefined|A unique id, preferably a GUID, used for optimization. The GUID is used to access a cached stack. |
|
|
349
|
+
|depth |[[REF=,MDN_number]] |0 |Move down depth steps in stack when choosing the **file name** to refer to in the log. `Values other than default mostly for use within ActorJs.`|
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
[[NOTE={"guid":"058d5e7f-5235-48d2-8018-617bfa4aeea0"}]]
|
|
353
|
+
[[ANCHOR={"id":"05e492cd-2480-4885-862d-db8dd385190a","visible":true}]]
|
|
354
|
+
#### **Example logVerifySuccess**
|
|
355
|
+
|
|
356
|
+
```javascript
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
this.logVerifySuccess('Demo verify success log');
|
|
361
|
+
this.logVerifySuccess(() => 'Demo verify success log');
|
|
362
|
+
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
```object
|
|
366
|
+
|
|
367
|
+
[log](Success, Mon. 03 Oct 2016 22:52:05 GMT : 901.764, DemoLogLocal[1], Demo verify success log., Actors-global.demo.log.DemoLogLocal.js)
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
[[NOTE={"guid":"e330ddde-7b2a-4d73-8fae-f4d6abb32354"}]]
|
|
371
|
+
[[ANCHOR={"id":"20139643-44ee-40a4-9678-31b24642a313","visible":true}]]
|
|
372
|
+
#### **Test Cases logVerifySuccess**
|
|
373
|
+
+ [DemoLog001](/../test-cases/Actor/Demo/DemoLog001)
|
|
374
|
+
|
|
375
|
+
***
|
|
376
|
+
[[NOTE={"guid":"2a7ae479-076d-4c87-a4e2-e803802a9023"}]]
|
|
377
|
+
[[ANCHOR={"id":"logger-api-log-warning","visible":true}]]
|
|
378
|
+
### **logWarning**
|
|
379
|
+
```
|
|
380
|
+
this.logWarning(message[, group[, guid[, depth=0]]])
|
|
381
|
+
```
|
|
382
|
+
Generates a debug log.
|
|
383
|
+
|
|
384
|
+
[[NOTE={"guid":"80af34a8-a888-4a2e-98ee-4ac240aefe7a"}]]
|
|
385
|
+
[[ANCHOR={"id":"a8e09b72-6d80-4697-b236-5d1f9a4d2c0a","visible":true}]]
|
|
386
|
+
#### **Method Description**
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
[[NOTE={"guid":"335d920b-e1c0-4fa3-b840-959ac1c84bd7"}]]
|
|
390
|
+
[[ANCHOR={"id":"b4979205-4326-407a-bc67-f1fee1eee634","visible":true}]]
|
|
391
|
+
```table
|
|
392
|
+
Config(classHeading: )
|
|
393
|
+
|
|
394
|
+
|Parameters |
|
|
395
|
+
|Name |Type |Default |Description |
|
|
396
|
+
|message|[[REF=,MDN_string]] | [[REF=,MDN_Function]]| |The log as a [[REF=,MDN_string]] or a [[REF=,MDN_Function]] returning the log as a [[REF=,MDN_string]]. |
|
|
397
|
+
|guid |[[REF=,MDN_string]] |undefined|A unique id, preferably a GUID, used for optimization. The GUID is used to access a cached stack. |
|
|
398
|
+
|depth |[[REF=,MDN_number]] |0 |Move down depth steps in stack when choosing the **file name** to refer to in the log. `Values other than default mostly for use within ActorJs.`|
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
[[NOTE={"guid":"40f19132-eaa9-4e16-9a73-4fa8f975faeb"}]]
|
|
402
|
+
[[ANCHOR={"id":"2913ca28-a3b4-422b-b4bd-d98bb9296d12","visible":true}]]
|
|
403
|
+
#### **Example logWarning**
|
|
404
|
+
|
|
405
|
+
```javascript
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
this.logWarning('Demo warning log');
|
|
410
|
+
this.logWarning(() => 'Demo warning log');
|
|
411
|
+
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
```object
|
|
415
|
+
|
|
416
|
+
[log](Warning, Mon. 03 Oct 2016 22:52:05 GMT : 901.764, DemoLogLocal[1], Demo warning log., Actors-global.demo.log.DemoLogLocal.js)
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
[[NOTE={"guid":"3e51313c-8dc2-4bce-96f1-4541b719ed01"}]]
|
|
420
|
+
[[ANCHOR={"id":"1bf3fedd-eb5f-4746-9bb9-b9e48fc49ead","visible":true}]]
|
|
421
|
+
#### **Test Cases logWarning**
|
|
422
|
+
+ [DemoLog001](/../test-cases/Actor/Demo/DemoLog001)
|
|
423
|
+
|
|
424
|
+
***
|
|
425
|
+
|
|
426
|
+
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# **Server Stack API**
|
|
2
|
+
[[API-STATUS=STABLE, ]]
|
|
3
|
+
[[DOC-STATUS=PARTLY, ]]
|
|
4
|
+
|
|
5
|
+
[[NOTE={"guid":"f0f932f7-60a0-4bfe-9f79-6bfe6b623051"}]]
|
|
6
|
+
[[ANCHOR={"id":"97aa2f7b-182a-4530-bda1-e96694ce2500","visible":true}]]
|
|
7
|
+
## **Description**
|
|
8
|
+
|
|
9
|
+
By definition a server is an [[REF=, ABS_Actor]] allowing another parts called a clients to connect to it. When the [[REF=, ABS_Actor]] is connected it will get a [[REF=, ABS_Stack_Server_Connection]] to send and receive data through. A [[REF=, ABS_Stack_Server_Connection]] implements the stack part of a protocol and contains an Encoder and a Decoder. All kind of timing handling in the Stack will not be handled by the [[REF=, ABS_Stack_Server_Connection]] . It must be handled by the [[REF=, ABS_Actor]] it self. The transport layer is separated from the [[REF=, ABS_Stack]] in the [[REF=, ABS_Stack_Server_Connection]] which makes it possible to use all implemented transports on all [[REF=, ABS_Stack]]s.
|
|
10
|
+
|
|
11
|
+
The following Actor types do have server capability.
|
|
12
|
+
+ **[[REF=, ABS_Actor_Terminating]]**
|
|
13
|
+
+ **[[REF=, ABS_Actor_Proxy]]**
|
|
14
|
+
|
|
15
|
+
In the ***initServer()** method and in the ***run()** method it's possible for an [[REF=, ABS_Actor]] to create a [[REF=, ABS_Stack_Server_Connection]].
|
|
16
|
+
|
|
17
|
+
The implementation of the Server Stack API starts in [[REF=, CODE_Stack_Server]].
|
|
18
|
+
|
|
19
|
+
[[NOTE={"guid":"511cb0c6-413e-4d9e-b89a-24d272866d55"}]]
|
|
20
|
+
[[ANCHOR={"id":"fbf4c7a3-28fa-4cd1-9545-0b1ab9bad220","visible":true}]]
|
|
21
|
+
## **API Methods**
|
|
22
|
+
* **[*createServer](#server-stack-api-create-server)**
|
|
23
|
+
* **[switchProtocol](#server-stack-api-switch-protocol)**
|
|
24
|
+
|
|
25
|
+
***
|
|
26
|
+
[[NOTE={"guid":"e4743fcb-5743-4b75-ba2e-86eb21e3e3f4"}]]
|
|
27
|
+
[[ANCHOR={"id":"server-stack-api-create-server","visible":true}]]
|
|
28
|
+
### ***createServer**
|
|
29
|
+
|
|
30
|
+
``` js
|
|
31
|
+
this.createServer(stackName, options)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
#### **Method Description**
|
|
35
|
+
Starts a server, if it is not already started, and returns a [[REF=, ABS_Stack_Server_Connection]].
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
[[NOTE={"guid":"8ccf6fb4-685a-4d5a-a469-a8bc8a905430"}]]
|
|
39
|
+
[[ANCHOR={"id":"1784e688-a34b-4463-a70e-df3d8a2aa07d","visible":true}]]
|
|
40
|
+
```table
|
|
41
|
+
Config(classHeading: )
|
|
42
|
+
|
|
43
|
+
|Parameters |
|
|
44
|
+
|Name |Type |Default |Description |
|
|
45
|
+
|stackName |[[REF=,MDN_string]] | |Name of the Server Stack. |
|
|
46
|
+
|options |[[REF=,MDN_object]] | |Object with options |
|
|
47
|
+
|\- srvIndex |[[REF=,MDN_number]] |0 |Index of the srv column from the Actor table. If the srv column is a [[REF=,MDN_string]], the name of the destination address, the value must be 0. If the srv column is an Array [[REF=,MDN_strings]], the value must be an existing index in the Array. |
|
|
48
|
+
|\- networkType |[[REF=,MDN_number]] |[determined by the Stack]|Number defining the network type. Implementations of stacks separate the data sent and the transport layer to be used. The stack determines the default value. See the help description for the stack whose name is used in the first parameter stackName.<br/>TCP, StackApi.NetworkType.TCP=0<br/>UDP, StackApi.NetworkType.UDP=1<br/>TCP, StackApi.NetworkType.MC=2<br/>|
|
|
49
|
+
|\- reuse |[[REF=,MDN_boolean]]|false |`ToDo:` |
|
|
50
|
+
|\- share |[[REF=,MDN_boolean]]|false |`ToDo:` |
|
|
51
|
+
|\- connectionOptions|[[REF=,MDN_object]] | |connectionOptions is a connection-specific object. See the help description for the stack you used to find out which methods are supported. |
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
[[NOTE={"guid":"a35f4891-fb2f-4550-b588-100f3a9b293b"}]]
|
|
55
|
+
[[ANCHOR={"id":"5058d149-3759-4bae-9936-6664bbb75027","visible":true}]]
|
|
56
|
+
```table
|
|
57
|
+
Config(classHeading: )
|
|
58
|
+
|
|
59
|
+
|Returns |
|
|
60
|
+
|Type |Description |
|
|
61
|
+
|[[REF=,MDN_object]]|The returned value is an object that inherits from ***StackApi.ServerConnection***. See the help description for the stack you used to find out which methods are supported.|
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
[[NOTE={"guid":"c6118eb0-e62a-49df-a048-b4bcba24def3"}]]
|
|
65
|
+
[[ANCHOR={"id":"9841e6ce-11db-42ee-a65d-4a08f7d7335f","visible":true}]]
|
|
66
|
+
```table
|
|
67
|
+
Config(classHeading: )
|
|
68
|
+
|
|
69
|
+
|Async |
|
|
70
|
+
|type |Description |
|
|
71
|
+
|yield|Naming convention generated. If regexp ***/this.(.\*)Connection/*** is fulfilled|
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
[[NOTE={"guid":"bd9cc25e-3de9-4670-ad28-fec1564c41f4"}]]
|
|
76
|
+
[[ANCHOR={"id":"52831e82-a631-449e-9b1c-552606b8e374","visible":true}]]
|
|
77
|
+
#### **Example using createServer - 1**
|
|
78
|
+
Normal usage of the Server Stack API
|
|
79
|
+
|
|
80
|
+
```tc
|
|
81
|
+
|Actor |
|
|
82
|
+
|name |node|type|phase|execution|src |dst |srv|testData|verification|
|
|
83
|
+
|SocketExample1Orig| |orig|exec | |testSrv1| | | | |
|
|
84
|
+
|SocketExample1Term| |term|exec | | |testSrv1| | | |
|
|
85
|
+
| | | | | | | | | | |
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
[[NOTE={"guid":"f27e316c-ba32-4117-a09b-2a59429243cf"}]]
|
|
89
|
+
[[ANCHOR={"id":"1f43ef25-9cfb-404b-8f15-5c5a99b68f05","visible":true}]]
|
|
90
|
+
```javascript
|
|
91
|
+
|
|
92
|
+
class SocketExample1Term extends ActorTerminating {
|
|
93
|
+
constructor() {
|
|
94
|
+
super();
|
|
95
|
+
this.socketConnection = this.create();
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
*initServer() {
|
|
99
|
+
this.createServer('socket', this.socketConnection);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
*exit() {
|
|
103
|
+
this.closeConnection(this.socketConnection);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
[[NOTE={"guid":"fe2d6c80-8578-48ed-928e-5a1c71a345e1"}]]
|
|
109
|
+
[[ANCHOR={"id":"15616995-ffdc-4f2b-a340-a8a5984cbb3e","visible":true}]]
|
|
110
|
+
#### **Example using createServer - 2**
|
|
111
|
+
Changing the networkType
|
|
112
|
+
|
|
113
|
+
```tc
|
|
114
|
+
|Actor |
|
|
115
|
+
|name |node|type|phase|execution|src |dst |srv|testData|verification|
|
|
116
|
+
|SocketExample2Orig| |orig|exec |testSrc1 |testSrv1| | | | |
|
|
117
|
+
|SocketExample2Term| |term|exec | | |testSrv1| | | |
|
|
118
|
+
| | | | | | | | | | |
|
|
119
|
+
|
|
120
|
+
|TestDataTestCase |
|
|
121
|
+
|key |value|description|
|
|
122
|
+
|transport|udp | |
|
|
123
|
+
| | | |
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
[[NOTE={"guid":"31f69662-7a09-4134-b124-0b90020ca8d3"}]]
|
|
127
|
+
[[ANCHOR={"id":"4a740908-d8be-4c89-b768-e3083e7a8b85","visible":true}]]
|
|
128
|
+
```javascript
|
|
129
|
+
|
|
130
|
+
class SocketExample2Term extends ActorTerminating {
|
|
131
|
+
constructor() {
|
|
132
|
+
super();
|
|
133
|
+
this.socketConnection = this.create();
|
|
134
|
+
this.networkType = 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
*data() {
|
|
138
|
+
this.networkType = this.getTestDataNumber('transport', 'tcp', {
|
|
139
|
+
tcp: NetworkType.TCP,
|
|
140
|
+
udp: NetworkType.UDP
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
*initServer() {
|
|
145
|
+
this.createServer('socket', this.socketConnection, {
|
|
146
|
+
networkType: this.networkType
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
*exit() {
|
|
151
|
+
this.closeConnection(this.socketConnection);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
[[NOTE={"guid":"5ed6b29e-f25b-4c02-a61c-8d7178ae2839"}]]
|
|
158
|
+
[[ANCHOR={"id":"a4f76d72-f272-4a2d-b94a-aa2d355b6837","visible":true}]]
|
|
159
|
+
#### **Example using createServer - 3**
|
|
160
|
+
Creating two servers
|
|
161
|
+
|
|
162
|
+
```tc
|
|
163
|
+
|Actor |
|
|
164
|
+
|name |node|type|phase|execution |src |dst |srv|testData|verification|
|
|
165
|
+
|SocketExample3Orig| |orig|exec |["testSrc1", "testSrc2"]|["testSrv1", "testSrv2"]| | | | |
|
|
166
|
+
|SocketExample3Term| |term|exec | | |["testSrv1", "testSrv2"]| | | |
|
|
167
|
+
| | | | | | | | | | |
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
[[NOTE={"guid":"c9fd4699-773c-4336-94b8-8e6db7dca59b"}]]
|
|
171
|
+
[[ANCHOR={"id":"ddbd52ba-4946-4d68-a3ae-98f8531fcb23","visible":true}]]
|
|
172
|
+
```javascript
|
|
173
|
+
|
|
174
|
+
class SocketExample3Term extends ActorTerminating {
|
|
175
|
+
constructor() {
|
|
176
|
+
super();
|
|
177
|
+
this.socketConnection1 = this.create();
|
|
178
|
+
this.socketConnection2 = this.create();
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
*initServer() {
|
|
182
|
+
this.createServer('socket', this.socketConnection1);
|
|
183
|
+
this.createServer('socket', this.socketConnection2, {
|
|
184
|
+
srvIndex: 1
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
*exit() {
|
|
189
|
+
this.closeConnection(this.socketConnection1);
|
|
190
|
+
this.closeConnection(this.socketConnection2);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
[[NOTE={"guid":"fc93b7b1-cd51-4616-857e-ef263f10809a"}]]
|
|
197
|
+
[[ANCHOR={"id":"f1abb1ce-a23d-47d5-be06-390649e636a7","visible":true}]]
|
|
198
|
+
#### **Test Cases using createServer**
|
|
199
|
+
+ [DocActorApiClientStackCreateConnectionSingle](/../test-cases/Actor/Doc/DocActorApiClientStackCreateConnectionSingle)
|
|
200
|
+
+ [DocActorApiClientStackCreateConnectionSingleUdp](/../test-cases/Actor/Doc/DocActorApiClientStackCreateConnectionSingleUdp)
|
|
201
|
+
+ [DocActorApiClientStackCreateConnectionDouble](/../test-cases/Actor/Doc/DocActorApiClientStackCreateConnectionDouble)
|
|
202
|
+
|
|
203
|
+
***
|
|
204
|
+
|
|
205
|
+
[[NOTE={"guid":"59767f08-eb3b-47c4-85b1-6929de9c7bc5"}]]
|
|
206
|
+
[[ANCHOR={"id":"server-stack-api-switch-protocol","visible":true}]]
|
|
207
|
+
### **switchProtocol**
|
|
208
|
+
|
|
209
|
+
``` js
|
|
210
|
+
this.switchProtocol(stackName, currentConnection)
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
#### **Method Description**
|