24 lines
729 B
Plaintext
24 lines
729 B
Plaintext
/*@!Encoding:1252*/
|
|
|
|
variables
|
|
{
|
|
// Some constants
|
|
const long WSA_IO_PENDING = 997;
|
|
const long WSAEWOULDBLOCK = 10035;
|
|
const dword INVALID_IP = 0xFFFFFFFF;
|
|
|
|
long gIpLastErr = 0;
|
|
char gIpLastErrStr[512] = "";
|
|
|
|
// The state of the socket will be safed here. This way we can check if we can send/receive packets
|
|
// The order of the states is important
|
|
enum SocketState {ERROR = 0, NULL = 100, CONNECTING = 120, CLOSED = 140, OK = 200};
|
|
enum SocketState gSocketState = NULL;
|
|
|
|
dword gRemoteIP = INVALID_IP;
|
|
word gRemotePort = 0;
|
|
|
|
// The buffer in which received telegrams are saved
|
|
byte gRxBuffer[8192];
|
|
}
|