MQTT-Gateway/network.h
damage ace99dfe93 send and receive simultaneously
values were ok, EDDB has a mag derivation of ~4° *facepalm*
2024-01-21 19:40:19 +01:00

18 lines
489 B
C

#define DEST_SERVER "::1"
#define DEST_PORT 49000
#define SRC_PORT 49666
#define SEND_BUFFER 512
#define RECV_BUFFER 256
#define DGRAM_MSG_LENGTH 4
#define DGRAM_NULL_LENGTH 1
extern const int DGRAM_MSG_START;
extern const int DGRAM_PAYLOAD_START;
int sendToXPlane(int sock, char *destAddr, int destPort, char *msg, void *payload, int lengthOfPayload);
int recvFromXPlane(int sock, char msg[4], void *payload, int maxLength);
int createSocket(int srcPort);
void closeSocket(int sock);