projects
/
cascardo
/
rnetproxy.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Connection events are handled by hooks
[cascardo/rnetproxy.git]
/
nethook.h
1
#ifndef NET_HOOK_H
2
#define NET_HOOK_H
3
4
#include <gnet.h>
5
6
typedef struct _net_hook_t net_hook_t;
7
typedef void (*net_connect) (net_hook_t*);
8
typedef void (*net_close) (net_hook_t*);
9
typedef void (*net_write) (net_hook_t*);
10
typedef void (*net_read) (net_hook_t*, gchar*, size_t);
11
12
struct _net_hook_t
13
{
14
GConn* conn;
15
GConn* peer;
16
gboolean server;
17
net_connect connect;
18
net_close close;
19
net_write write;
20
net_read read;
21
gpointer data;
22
};
23
24
#endif