Commit d79a6983 authored by Youness Alaoui's avatar Youness Alaoui

Renaming udp directory to socket

parent 87bd70ff
...@@ -56,6 +56,15 @@ ...@@ -56,6 +56,15 @@
#include "udp-bsd.h" #include "udp-bsd.h"
#include <stun/stunagent.h> #include <stun/stunagent.h>
typedef struct {
StunMessage msg;
uint8_t buffer[STUN_MAX_MESSAGE_SIZE];
stun_timer_t timer;
gboolean done;
} UDPMessage;
typedef struct { typedef struct {
NiceAddress peer; NiceAddress peer;
uint16_t channel; uint16_t channel;
...@@ -64,6 +73,7 @@ typedef struct { ...@@ -64,6 +73,7 @@ typedef struct {
typedef struct { typedef struct {
StunAgent agent; StunAgent agent;
GList *channels; GList *channels;
GList *retransmissions;
ChannelBinding *current_binding; ChannelBinding *current_binding;
NiceUDPSocket *udp_socket; NiceUDPSocket *udp_socket;
NiceAddress server_addr; NiceAddress server_addr;
...@@ -75,6 +85,19 @@ typedef struct { ...@@ -75,6 +85,19 @@ typedef struct {
} turn_priv; } turn_priv;
static gboolean retransmit_udp_packet (turn_priv *priv)
{
NiceAgent *agent = pointer;
gboolean ret;
g_static_rec_mutex_lock (&agent->mutex);
ret = priv_discovery_tick_unlocked (pointer);
g_static_rec_mutex_unlock (&agent->mutex);
return ret;
}
}
static gboolean static gboolean
priv_send_channel_bind (turn_priv *priv, StunMessage *resp, priv_send_channel_bind (turn_priv *priv, StunMessage *resp,
uint16_t channel, NiceAddress *peer) { uint16_t channel, NiceAddress *peer) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment