Skip to content

Commit 919dfb7

Browse files
committed
📌 Nodepp | Stable Version | V1.1.0 📌
1 parent 2ee12e2 commit 919dfb7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+4107
-2452
lines changed

.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ One of the standout features of Nodepp is its 100% asynchronous architecture, po
4040
🪟: g++ -o main main.cpp -I ./include -lws2_32 ; ./main
4141
```
4242

43+
## Test Unit
44+
```bash
45+
( cd ./test; g++ -o main main.cpp -I../include -lssl -lcrypto ; ./main )
46+
```
47+
4348
## Examples
4449
### Hello world
4550
```cpp

examples/28-Path.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ void onMain(){
1616
console::log( "base:", ppt.base );
1717
console::log( "extn:", ppt.ext );
1818

19-
}
19+
}

examples/30-HTTPS-Client.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void onMain(){
1717
// args.file = file_t("PATH","r");
1818
// args.body = "MYBODY";
1919

20-
https::fetch( args, &ssl )
20+
https::fetch( args, ssl )
2121

2222
.then([]( https_t cli ){
2323
cli.onData([]( string_t chunk ){

examples/31-HTTP-Server.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ void onMain(){
1515
}));
1616

1717
cli.write( date::fulltime() );
18-
cli.close();
1918

2019
});
2120

examples/33-HTTPS-Server.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ void onMain(){
1717
}));
1818

1919
cli.write( date::fulltime() );
20-
cli.close();
2120

22-
}, &ssl );
21+
}, ssl );
2322

2423
server.listen( "localhost", 8000, [=]( ssocket_t server ){
2524
console::log("server started at https://localhost:8000");

examples/34-HTTPS-Server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void onMain(){
5858

5959
}
6060

61-
}, &ssl );
61+
}, ssl );
6262

6363
server.listen( "localhost", 8000, [=]( ssocket_t /*unused*/ ){
6464
console::log("server started at https://localhost:8000");

examples/35-WS-Client.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@ void onMain() {
2727
process::exit(1);
2828
});
2929

30+
stream::pipe( cin );
31+
3032
});
3133

32-
stream::pipe( cin );
34+
client.onError([=]( except_t err ){
35+
console::log( "<>", err.data() );
36+
});
3337

3438
}

examples/37-WSS-Client.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ void onMain() {
99

1010
ssl_t ssl; //ssl_t ssl( "./ssl/cert.key", "./ssl/cert.crt" );
1111

12-
auto client = wss::client( "wss://localhost:8000/", &ssl );
12+
auto client = wss::client( "wss://localhost:8000/", ssl );
1313
auto cin = fs::std_input();
1414

1515
client.onConnect([=]( wss_t cli ){
@@ -29,8 +29,12 @@ void onMain() {
2929
process::exit(1);
3030
});
3131

32+
stream::pipe( cin );
33+
3234
});
3335

34-
stream::pipe( cin );
36+
client.onError([=]( except_t err ){
37+
console::log( "<>", err.data() );
38+
});
3539

3640
}

examples/38-WSS-Server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ void onMain(){
2020

2121
cli.write("Hello World!");
2222

23-
}, &ssl ); wss::server( server );
23+
}, ssl ); wss::server( server );
2424

2525
server.onConnect([=]( wss_t cli ){
2626

0 commit comments

Comments
 (0)