less magic numbers and generic send function
This commit is contained in:
11
network.h
11
network.h
@@ -1,9 +1,14 @@
|
||||
#define SERVER "::1"
|
||||
#define PORT 49000
|
||||
|
||||
#define COMMAND_BUFFER 256
|
||||
#define SEND_BUFFER 256
|
||||
|
||||
char* printable(char *str);
|
||||
int sendCommand(int sock, char *cmd);
|
||||
#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 *msg, char *payload);
|
||||
int connectXPlane(char *addr, int port);
|
||||
int disconnectXPlane(int sock);
|
||||
|
||||
Reference in New Issue
Block a user