Skip to content

Commit e2cd165

Browse files
committed
Merge pull request #56 from dosshell/feature/refactor_tcs_socket_func
Make tcs_socket function type safe
2 parents e713268 + 75eae2f commit e2cd165

7 files changed

Lines changed: 1011 additions & 1163 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ int main(int argc, const char* argv[])
2020
tcs_lib_init();
2121

2222
TcsSocket client_socket = TCS_SOCKET_INVALID;
23-
tcs_socket(&client_socket, TCS_AF_IP4, TCS_SOCK_STREAM, TCS_PROTOCOL_IP_TCP);
23+
tcs_socket(&client_socket, TCS_FAMILY_IP4, TCS_SOCK_STREAM, TCS_PROTOCOL_IP_TCP);
2424
tcs_connect_str(client_socket, "example.com", 80);
2525

2626
uint8_t send_buffer[] = "GET / HTTP/1.1\r\nHost: example.com\r\n\r\n";

include/tinycsocket.h

Lines changed: 409 additions & 509 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)