반응형
Raspberry Pi Pico W - TCP Server C 예제
Raspberry Pi Pico&Pico W2023. 10. 19. 21:48Raspberry Pi Pico W - TCP Server C 예제

Raspberry Pi Pico W에서 TCP Server C 예제를 사용하는 방법을 다루고 있습니다. 2022. 12. 25 최초작성 진행하기 전에 다음 포스트를 먼저 진행해야 합니다. Windows에 Raspberry Pi Pico C 개발 환경 만들기 https://webnautes.tistory.com/2092 아래 링크에 있는 tcp_server 예제 프로젝트를 구성하는 방법부터 다룹니다. 코드를 수정하여 사용했습니다. 수정한 코드는 포스트에 있습니다. https://github.com/raspberrypi/pico-examples/tree/master/pico_w/tcp_server 1. 윈도우 키를 누른 후, “ Developer Command”을 입력하여 Developer Command P..

프로그래밍 노트/C&C++2015. 11. 14. 09:53linux echo server ( pthread 사용 )

#include #include #include #include #include #include #include #include #include #include #include #include #include struct thread_data{ int fd; char ip[20]; }; void *ThreadMain(void *argument); // get sockaddr, IPv4 or IPv6: void *get_in_addr(struct sockaddr *sa) { if (sa->sa_family == AF_INET) { return &(((struct sockaddr_in*)sa)->sin_addr); } return &(((struct sockaddr_in6*)sa)->sin6_addr); }..

반응형
image