Replies: 2 comments 1 reply
-
필요 API (IRC 메세지 구조)
{
command : string,
prefix: string,
params: Vector<string>,
}
{
content: string,
ip: (v4 or v6) string,
}
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Socket 관련
// 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);
}
getaddrinfo(NULL, PORT, &hints, &servinfo))
(p = servinfo; p != NULL; p = p->ai_next) {
// socket(), setsocketopt(), bind()
}
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
추상화
사용자
채널
서버
역할
Beta Was this translation helpful? Give feedback.
All reactions