Skip to content

Commit

Permalink
README.md: remove trailing spaces and fix github URL (#600)
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Trangoni <[email protected]>
  • Loading branch information
mjtrangoni authored Dec 21, 2023
1 parent 85e0e87 commit b1bc687
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
![Ziggy using the ziti-sdk-c](https://raw.githubusercontent.com/openziti/branding/main/images/banners/C.jpg)

# OpenZiti C SDK

![Build Status](https://github.com/openziti/ziti-sdk-c/actions/workflows/cmake.yml/badge.svg?branch=main)

The OpenZiti C SDK allows developers to create their own custom OpenZiti network endpoint applications.
Expand Down Expand Up @@ -42,7 +43,7 @@ target_link_libraries(most-secure-app-ever PRIVATE ziti)
You will also need other libraries that OpenZiti SDK uses (they are specified in [vcpkg.json](vcpkg.json)):

| library | usage |
|-------------|--------------------------------|
|-------------|--------------------------------|
| `libuv` | event loop |
| `openssl` | TLS |
| `zlib` | HTTPS compression |
Expand Down Expand Up @@ -78,15 +79,15 @@ There are just three functions that cover SDK initialization and teardown.
#include <ziti/zitilib.h>

int main(int argc, char *argv[]) {

const char *identity_file = process_args(argc, argv);

Ziti_lib_init();
ziti_context ztx = Ziti_load_context(identity_file);

...


Ziti_lib_shutdown();
}
```
Expand All @@ -104,14 +105,14 @@ access to it).
```c
ziti_socket_t sock = Ziti_socket(SOCK_STREAM);
int error = Ziti_connect(sock, ztx, "my-secure-service", NULL);
// use sock as normal socket
do {
write(sock, ...);
read(sock, ...);
} while (!done);
close(sock);
```
Expand All @@ -128,23 +129,23 @@ access to it).
ziti_socket_t srv = Ziti_socket(SOCK_STREAM);
int error = Ziti_bind(srv, ztx, "my-secure-service", NULL);
Ziti_listen(srv, 10); // sets accept backlog

do {
char caller[128];
ziti_socket_t clt = Ziti_accept(srv, caller, (int)sizeof(caller));

// use client as normal socket
process_client(clt);

} while (!done);

close(srv);
```
## Getting Help
------------
Please use these community resources for getting help. We use GitHub [issues](https://github.com/NetFoundry/ziti-sdk-c/issues)
Please use these community resources for getting help. We use GitHub [issues](https://github.com/openziti/ziti-sdk-c/issues)
for tracking bugs and feature requests and have limited bandwidth to address them.
- Read [the docs](https://docs.openziti.io/)
Expand Down

0 comments on commit b1bc687

Please sign in to comment.