Skip to content

Commit

Permalink
doc: update README
Browse files Browse the repository at this point in the history
Signed-off-by: hexian000 <[email protected]>
  • Loading branch information
hexian000 committed Jan 7, 2024
1 parent f9b42e5 commit c92d1f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ network access -> proxy client -> kcptun-libev client ->
```

Less typically, reliable UDP can help users connect to TCP services behind NAT, see [rendezvous mode](#rendezvous-mode).
```
client -> NAT1 -> rendezvous server
server -> NAT2 -> rendezvous server
client -> NAT1 -> NAT2 -> server
```

Since KCP retransmits packets more aggressively. It is recommended to enable proper QoS at the NIC level when running on a public network.

Expand Down
7 changes: 3 additions & 4 deletions src/sockutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ bool sa_equals(const struct sockaddr *a, const struct sockaddr *b);
bool sa_matches(const struct sockaddr *bind, const struct sockaddr *dest);
int format_sa(const struct sockaddr *sa, char *buf, size_t buf_size);

enum {
RESOLVE_TCP = 0x0,
RESOLVE_UDP = 0x1,
RESOLVE_PASSIVE = 0x2,
enum { RESOLVE_TCP = 0x0,
RESOLVE_UDP = 0x1,
RESOLVE_PASSIVE = 0x2,
};
bool resolve_addr(union sockaddr_max *sa, const char *s, int flags);

Expand Down

0 comments on commit c92d1f7

Please sign in to comment.