This commit is contained in:
35
posix/Internal.h
Normal file
35
posix/Internal.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#ifndef CGE_NET_INTERNAL_H
|
||||
#define CGE_NET_INTERNAL_H
|
||||
|
||||
#define _POSIX_C_SOURCE 200112L
|
||||
#include <poll.h>
|
||||
#include <errno.h>
|
||||
#include "../CgeNet.h"
|
||||
|
||||
struct PollData;
|
||||
|
||||
struct CgeNetSocket {
|
||||
int handle;
|
||||
int domain;
|
||||
int type;
|
||||
int lastError;
|
||||
void *context;
|
||||
CgeNetPoll *pollObject;
|
||||
size_t pollIndex;
|
||||
};
|
||||
|
||||
struct PollData {
|
||||
CgeNetSocket *socket;
|
||||
CgeNetCallback callback;
|
||||
int events;
|
||||
};
|
||||
|
||||
struct CgeNetPoll {
|
||||
struct pollfd *pfd;
|
||||
struct PollData *data;
|
||||
size_t size;
|
||||
size_t capacity;
|
||||
int lastError;
|
||||
};
|
||||
|
||||
#endif /* CGE_NET_INTERNAL_H */
|
||||
Reference in New Issue
Block a user