Skip to content

Commit

Permalink
Registered TCP recieve callback
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonbrown2 committed Apr 1, 2016
1 parent 2629b43 commit 9537b14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ void tcp_setup( void )
}

espconn_regist_sentcb(&tcp_server, tcp_send_callback);
espconn_regist_recvcb(&tcp_server, tcp_recv_callback);
}

void tcp_recv_callback(void *arg, char *pdata, unsigned short len)
{
os_printf("Data Recieved!\n");
os_printf(pdata);
}

void tcp_send_callback(void *arg)
Expand All @@ -64,7 +66,6 @@ void tcp_connect_callback(void *arg)
{
current_guy = *(struct espconn*)arg;
os_printf("Connection attempt!\n");
//espconn_regist_recvcb(&current_guy, tcp_recv_callback);
//espconn_regist_reconcb(&current_guy, tcp_reconnect_callback);
//espconn_regist_write_finish(&current_guy, tcp_write_finish_callback);
espconn_regist_disconcb(&current_guy, tcp_disconnect_callback);
Expand Down

0 comments on commit 9537b14

Please sign in to comment.