|
|
|
@ -58,6 +58,8 @@ TR_CLASS(TR_Socket) { |
|
|
|
TR_SocketFin fin_state; |
|
|
|
}; |
|
|
|
|
|
|
|
TR_INSTANCE_INIT(TR_Socket); |
|
|
|
|
|
|
|
#define TR_socketLog(socket) (((TR_Socket)(socket))->log) |
|
|
|
#define TR_socketFlags(socket) (((TR_Socket)(socket))->flags) |
|
|
|
#define TR_socketType(socket) (((TR_Socket)(socket))->type) |
|
|
|
@ -82,10 +84,14 @@ TR_CLASS(TR_TcpSocket) { |
|
|
|
int connected; |
|
|
|
}; |
|
|
|
|
|
|
|
TR_INSTANCE_INIT(TR_TcpSocket); |
|
|
|
|
|
|
|
TR_CLASS(TR_UdpSocket) { |
|
|
|
TR_EXTENDS(TR_Socket); |
|
|
|
}; |
|
|
|
|
|
|
|
TR_INSTANCE_INIT(TR_UdpSocket); |
|
|
|
|
|
|
|
typedef int (* TR_socketAction_fptr)(void *); |
|
|
|
|
|
|
|
int TR_socketInit(TR_Socket, TR_socketAction_fptr); |
|
|
|
|