Skip to content

Commit

Permalink
server also works now
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyu- committed Aug 20, 2018
1 parent af6126c commit f1ea2ac
Show file tree
Hide file tree
Showing 3 changed files with 324 additions and 278 deletions.
2 changes: 1 addition & 1 deletion UDPspeeder
Submodule UDPspeeder updated 5 files
+8 −2 common.h
+1 −1 fec_manager.h
+1 −6 main.cpp
+19 −7 misc.cpp
+3 −0 misc.h
14 changes: 8 additions & 6 deletions tun_dev_client.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "tun_dev.h"

int got_feed_back=0;
static int got_feed_back=0;

dest_t udp_dest;
dest_t tun_dest;
static dest_t udp_dest;
static dest_t tun_dest;


static void remote_cb(struct ev_loop *loop, struct ev_io *watcher, int revents)
Expand Down Expand Up @@ -56,7 +56,7 @@ static void remote_cb(struct ev_loop *loop, struct ev_io *watcher, int revents)
{
if(keep_reconnect==0)
{
mylog(log_fatal,"server restarted or switched to handle another client,exited\n");
mylog(log_fatal,"server restarted or switched to handle another client,exited. maybe you need --keep-reconnect\n");
myexit(-1);
}
else
Expand Down Expand Up @@ -121,6 +121,8 @@ static void tun_fd_cb(struct ev_loop *loop, struct ev_io *watcher, int revents)
static void delay_manager_cb(struct ev_loop *loop, struct ev_timer *watcher, int revents)
{
assert(!(revents&EV_ERROR));

//do nothing
}

static void fec_encode_cb(struct ev_loop *loop, struct ev_timer *watcher, int revents)
Expand Down Expand Up @@ -197,8 +199,8 @@ static void prepare_cb(struct ev_loop *loop, struct ev_prepare *watcher, int rev

int tun_dev_client_event_loop()
{
char data[buf_len];
int len;
//char data[buf_len];
//int len;
int i,j,k,ret;
int tun_fd;

Expand Down
Loading

0 comments on commit f1ea2ac

Please sign in to comment.