1
0
mirror of https://github.com/CPunch/Laika.git synced 2025-10-07 00:20:14 +00:00

Lib: Added support for IPV6 connections

This commit is contained in:
2022-06-04 10:11:28 -05:00
parent b00ac16cb3
commit c4c5bc9ce5
11 changed files with 36 additions and 40 deletions

View File

@@ -353,7 +353,7 @@ bool laikaC_pollPeers(struct sLaika_cnc *cnc, int timeout) {
LAIKA_TRY
/* setup and accept new peer */
laikaS_acceptFrom(&peer->sock, &cnc->sock, peer->ipv4);
laikaS_acceptFrom(&peer->sock, &cnc->sock, peer->ipStr);
laikaS_setNonBlock(&peer->sock);
/* add to our pollList */

View File

@@ -24,7 +24,7 @@ void laikaC_sendNewPeer(struct sLaika_peer *authPeer, struct sLaika_peer *peer)
laikaS_write(&authPeer->sock, peer->peerPub, sizeof(peer->peerPub));
laikaS_write(&authPeer->sock, peer->hostname, LAIKA_HOSTNAME_LEN);
laikaS_write(&authPeer->sock, peer->inet, LAIKA_INET_LEN);
laikaS_write(&authPeer->sock, peer->ipv4, LAIKA_IPV4_LEN);
laikaS_write(&authPeer->sock, peer->ipStr, LAIKA_IPSTR_LEN);
laikaS_writeByte(&authPeer->sock, peer->type);
laikaS_writeByte(&authPeer->sock, peer->osType);