diff --git a/lib/include/lpacket.h b/lib/include/lpacket.h index 366d0cb..3480975 100644 --- a/lib/include/lpacket.h +++ b/lib/include/lpacket.h @@ -1,6 +1,9 @@ #ifndef LAIKA_PACKET_H #define LAIKA_PACKET_H +#define LAIKA_MAGIC "LAI\x12" +#define LAIKA_MAGICLEN 4 + typedef enum { LAIKAPKT_HANDSHAKE_REQ, LAIKAPKT_HANDSHAKE_RES, diff --git a/lib/include/lsocket.h b/lib/include/lsocket.h index 64adcf4..c93b543 100644 --- a/lib/include/lsocket.h +++ b/lib/include/lsocket.h @@ -74,6 +74,7 @@ void laikaS_cleanSocket(struct sLaika_socket *sock); void laikaS_kill(struct sLaika_socket *sock); /* kills a socket */ void laikaS_connect(struct sLaika_socket *sock, char *ip, char *port); /* connect to ip & port */ void laikaS_bind(struct sLaika_socket *sock, uint16_t port); /* bind sock to port */ +void laikaS_acceptFrom(struct sLaika_socket *sock, struct sLaika_socket *from); bool laikaS_setNonBlock(struct sLaika_socket *sock); void laikaS_read(struct sLaika_socket *sock, void *buf, size_t sz); /* reads from inBuf */