Lines Matching refs:bev
82 server_read_cb(struct bufferevent *bev, void *ctx) in server_read_cb() argument
84 while (evbuffer_get_length(bufferevent_get_input(bev))) { in server_read_cb()
86 bufferevent_read(bev, &tmp, 1); in server_read_cb()
87 bufferevent_write(bev, &tmp, 1); in server_read_cb()
93 server_event_cb(struct bufferevent *bev, short events, void *ctx) in server_event_cb() argument
99 bufferevent_free(bev); in server_event_cb()
109 struct bufferevent *bev = bufferevent_socket_new(base, sock, in listener_accept_cb() local
112 bufferevent_setcb(bev, server_read_cb, NULL, server_event_cb, NULL); in listener_accept_cb()
113 bufferevent_enable(bev, EV_READ|EV_WRITE); in listener_accept_cb()
168 client_read_cb(struct bufferevent *bev, void *ctx) in client_read_cb() argument
171 struct event_base *base = bufferevent_get_base(bev); in client_read_cb()
173 bufferevent_read(bev, &tmp, 1); in client_read_cb()
178 bufferevent_free(bev); in client_read_cb()
190 client_event_cb(struct bufferevent *bev, short events, void *ctx) in client_event_cb() argument
194 bufferevent_write(bev, &tmp, 1); in client_event_cb()
200 bufferevent_enable(bev, EV_READ); in client_event_cb()
207 struct bufferevent *bev = bufferevent_socket_new(base, -1, in start_client() local
209 bufferevent_setcb(bev, client_read_cb, NULL, client_event_cb, NULL); in start_client()
211 if (bufferevent_socket_connect(bev, (struct sockaddr *)&saddr, in start_client()
214 bufferevent_free(bev); in start_client()