Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProgPr22-23-api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Janek Özbay
ProgPr22-23-api
Commits
98b8c19a
Commit
98b8c19a
authored
2 years ago
by
Laurin Gehlenborg
Browse files
Options
Downloads
Patches
Plain Diff
Newline als Ende einer Nachricht
parent
53d35dda
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Schnittstellendefinition_1.md
+8
-1
8 additions, 1 deletion
Schnittstellendefinition_1.md
with
8 additions
and
1 deletion
Schnittstellendefinition_1.md
+
8
−
1
View file @
98b8c19a
...
...
@@ -64,7 +64,7 @@
### [Struktur einer Nachricht](#v1/general/msg_structure)<a id="v1/general/msg_structure"></a>
Nachrichten sind aufgebaut nach dem Schema:
```
COMMAND;<ARGUMENT>[;[<OPTIONAL_ARG1>][;OPTIONAL_ARG2]]
COMMAND;<ARGUMENT>[;[<OPTIONAL_ARG1>][;OPTIONAL_ARG2]]
\n
```
Jeder Teil der Nachricht ist mit einem
`;`
getrennt.
Die Daten können in Java mithilfe von
`String.split(";");`
ausgelesen werden.
...
...
@@ -87,6 +87,13 @@ Sollte bspw. nur *OPTIONAL_ARG2* übergeben werden kann die Nachricht wie folgt
COMMAND;ARGUMENT;;OPTIONAL_ARG2
```
*Ende der Nachricht (\n):*
Nachrichten werden durch einen Zeilenumbruch beendet (in Java "
\n
").
Wenn zum Lesen und Schreiben von Nachrichten über Sockets Hilfsklassen wie BufferedReader oder PrintWriter benutzt werden,
dann gibt es häufig Methoden wie readLine() oder println(), die praktischerweise bis zum nächsten Zeilenumbruch lesen oder
automatisch einen Zeilenumbruch hinten anfügen.
### [Ablauf der Verbindung](#v1/general/connection_timeline)<a id="v1/general/connection_timeline"></a>

...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment