Skip to content

Commit 8f8daa3

Browse files
pfsk4tshic0ns
authored andcommitted
fix: Correct small mistakes in Readme (#352)
Change code example to use initialization with State Fix error in example Heartbeat workflow trace
1 parent 64c232d commit 8f8daa3

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,8 @@ WorkflowTrace trace = new WorkflowTrace();
132132
trace.add(new SendAction(new ClientHelloMessage()));
133133
trace.add(new ReceiveAction(new ServerHelloMessage())));
134134
trace.add(new SendAction(new FinishedMessage()));
135-
config.setWorkflowTrace(trace);
136-
TlsContext context = new TlsContext(config);
137-
DefaultWorkflowExecutor executor = new DefaultWorkflowExecutor(context);
135+
State state = new State(config, trace);
136+
DefaultWorkflowExecutor executor = new DefaultWorkflowExecutor(state);
138137
executor.execute();
139138

140139
```
@@ -225,17 +224,16 @@ We can of course use this concept by constructing our TLS workflows. Imagine you
225224
<Finished/>
226225
</ReceiveAction>
227226
<SendAction>
228-
<Application/>
229-
<Heartbeat/>
230-
</SendAction>
231-
<ReceiveAction>
232-
<Heartbeat>
227+
<Heartbeat>
233228
<payloadLength>
234229
<integerExplicitValueModification>
235230
<explicitValue>20000</explicitValue>
236231
</integerExplicitValueModification>
237232
</payloadLength>
238-
</Heartbeat>
233+
</Heartbeat><Heartbeat/>
234+
</SendAction>
235+
<ReceiveAction>
236+
<Heartbeat/>
239237
</ReceiveAction>
240238
</workflowTrace>
241239
```

0 commit comments

Comments
 (0)