Skip to content

Commit d3fde2b

Browse files
authored
Merge pull request #442 from Links2004/gpn19
Gpn19
2 parents 31bade1 + 6a76efa commit d3fde2b

File tree

11 files changed

+825
-736
lines changed

11 files changed

+825
-736
lines changed

.clang-format

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
BasedOnStyle: Google
3+
AccessModifierOffset: '-2'
4+
AlignAfterOpenBracket: DontAlign
5+
AlignConsecutiveAssignments: 'true'
6+
AlignConsecutiveDeclarations: 'false'
7+
AlignEscapedNewlines: Left
8+
AlignTrailingComments: 'true'
9+
AllowAllParametersOfDeclarationOnNextLine: 'false'
10+
AllowShortBlocksOnASingleLine: 'false'
11+
AllowShortCaseLabelsOnASingleLine: 'false'
12+
AllowShortFunctionsOnASingleLine: InlineOnly
13+
AllowShortIfStatementsOnASingleLine: 'true'
14+
AllowShortLoopsOnASingleLine: 'true'
15+
AlwaysBreakAfterDefinitionReturnType: None
16+
AlwaysBreakAfterReturnType: None
17+
AlwaysBreakBeforeMultilineStrings: 'true'
18+
AlwaysBreakTemplateDeclarations: 'false'
19+
BinPackParameters: 'true'
20+
BreakAfterJavaFieldAnnotations: 'false'
21+
BreakBeforeBinaryOperators: None
22+
BreakBeforeBraces: Attach
23+
BreakBeforeInheritanceComma: 'false'
24+
BreakBeforeTernaryOperators: 'false'
25+
BreakConstructorInitializers: BeforeColon
26+
BreakStringLiterals: 'false'
27+
ColumnLimit: '0'
28+
CompactNamespaces: 'true'
29+
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
30+
ConstructorInitializerIndentWidth: '4'
31+
ContinuationIndentWidth: '4'
32+
Cpp11BracedListStyle: 'false'
33+
DerivePointerAlignment: 'false'
34+
FixNamespaceComments: 'true'
35+
IndentCaseLabels: 'true'
36+
IndentWidth: '4'
37+
IndentWrappedFunctionNames: 'false'
38+
JavaScriptQuotes: Single
39+
JavaScriptWrapImports: 'false'
40+
KeepEmptyLinesAtTheStartOfBlocks: 'false'
41+
MaxEmptyLinesToKeep: '1'
42+
NamespaceIndentation: All
43+
ObjCBlockIndentWidth: '4'
44+
ObjCSpaceAfterProperty: 'false'
45+
ObjCSpaceBeforeProtocolList: 'false'
46+
PointerAlignment: Middle
47+
SortIncludes: 'false'
48+
SortUsingDeclarations: 'true'
49+
SpaceAfterCStyleCast: 'false'
50+
SpaceAfterTemplateKeyword: 'false'
51+
SpaceBeforeAssignmentOperators: 'true'
52+
SpaceBeforeParens: Never
53+
SpaceInEmptyParentheses: 'false'
54+
SpacesBeforeTrailingComments: '4'
55+
SpacesInAngles: 'false'
56+
SpacesInCStyleCastParentheses: 'false'
57+
SpacesInContainerLiterals: 'false'
58+
SpacesInParentheses: 'false'
59+
SpacesInSquareBrackets: 'false'
60+
TabWidth: '4'
61+
UseTab: Never
62+
63+
...

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,11 @@
2727
*.out
2828
*.app
2929
/tests/webSocketServer/node_modules
30+
31+
# IDE
32+
.vscode
33+
.cproject
34+
.project
35+
.settings
36+
*.swp
37+

examples/esp8266/WebSocketClient/WebSocketClient.ino

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,15 @@ void webSocketEvent(WStype_t type, uint8_t * payload, size_t length) {
4545
// send data to server
4646
// webSocket.sendBIN(payload, length);
4747
break;
48-
}
48+
case WStype_PING:
49+
// pong will be send automatically
50+
USE_SERIAL.printf("[WSc] get ping\n");
51+
break;
52+
case WStype_PONG:
53+
// answer to a ping we send
54+
USE_SERIAL.printf("[WSc] get pong\n");
55+
break;
56+
}
4957

5058
}
5159

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"type": "git",
1414
"url": "https://github.com/Links2004/arduinoWebSockets.git"
1515
},
16-
"version": "2.1.3",
16+
"version": "2.1.4",
1717
"license": "LGPL-2.1",
1818
"export": {
1919
"exclude": [

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=WebSockets
2-
version=2.1.3
2+
version=2.1.4
33
author=Markus Sattler
44
maintainer=Markus Sattler
55
sentence=WebSockets for Arduino (Server + Client)

0 commit comments

Comments
 (0)