18 lines
489 B
C
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);
|