if (nice_debug_is_enabled ()) {
gchar tmpbuf[INET6_ADDRSTRLEN];
nice_address_to_string (&local_candidate->addr, tmpbuf);
- nice_debug ("Agent %p: gathered %s local candidate: [%s]:%u"
- " for s%d/c%d. U/P '%s'/'%s' prio: %u", agent,
+ nice_debug ("Agent %p: gathered %s local candidate : [%s]:%u"
+ " for s%d/c%d. U/P '%s'/'%s'", agent,
_transport_to_string (local_candidate->transport),
tmpbuf, nice_address_get_port (&local_candidate->addr),
local_candidate->stream_id, local_candidate->component_id,
- local_candidate->username, local_candidate->password,
- local_candidate->priority);
+ local_candidate->username, local_candidate->password);
}
for (l = component->remote_candidates; l; l = l->next) {
NiceCandidate *remote_candidate = l->data;
if (transport == NICE_CANDIDATE_TRANSPORT_UDP) {
nicesock = nice_udp_bsd_socket_new (address);
} else if (transport == NICE_CANDIDATE_TRANSPORT_TCP_ACTIVE) {
- nicesock = nice_tcp_active_socket_new (agent->main_context, address,
- agent->reliable);
+ nicesock = nice_tcp_active_socket_new (agent->main_context, address);
} else if (transport == NICE_CANDIDATE_TRANSPORT_TCP_PASSIVE) {
- nicesock = nice_tcp_passive_socket_new (agent->main_context, address,
- agent->reliable);
+ nicesock = nice_tcp_passive_socket_new (agent->main_context, address);
} else {
/* TODO: Add TCP-SO */
}
#endif
typedef struct {
- gboolean reliable;
GSocketAddress *local_addr;
GMainContext *context;
} TcpActivePriv;
NiceSocket *
-nice_tcp_active_socket_new (GMainContext *ctx, NiceAddress *addr,
- gboolean reliable)
+nice_tcp_active_socket_new (GMainContext *ctx, NiceAddress *addr)
{
union {
struct sockaddr_storage storage;
sock->priv = priv = g_slice_new0 (TcpActivePriv);
- priv->reliable = reliable;
priv->context = g_main_context_ref (ctx);
priv->local_addr = gaddr;
nice_address_set_from_sockaddr (&local_addr, &name.addr);
new_socket = nice_tcp_bsd_socket_new_from_gsock (priv->context, gsock,
- &local_addr, addr, priv->reliable);
+ &local_addr, addr, TRUE);
g_object_unref (gsock);
return new_socket;
G_BEGIN_DECLS
-NiceSocket * nice_tcp_active_socket_new (GMainContext *ctx, NiceAddress *addr,
- gboolean reliable);
+NiceSocket * nice_tcp_active_socket_new (GMainContext *ctx, NiceAddress *addr);
NiceSocket * nice_tcp_active_socket_connect (NiceSocket *socket, NiceAddress *addr);
#endif
typedef struct {
- gboolean reliable;
-
GMainContext *context;
GHashTable *connections;
NiceSocketWritableCb writable_cb;
static guint nice_address_hash (const NiceAddress * key);
NiceSocket *
-nice_tcp_passive_socket_new (GMainContext *ctx, NiceAddress *addr,
- gboolean reliable)
+nice_tcp_passive_socket_new (GMainContext *ctx, NiceAddress *addr)
{
union {
struct sockaddr_storage storage;
nice_address_set_from_sockaddr (&sock->addr, &name.addr);
sock->priv = priv = g_slice_new0 (TcpPassivePriv);
- priv->reliable = reliable;
priv->context = g_main_context_ref (ctx);
priv->connections = g_hash_table_new_full ((GHashFunc) nice_address_hash,
(GEqualFunc) nice_address_equal, (
static gboolean
socket_is_reliable (NiceSocket *sock)
{
- TcpPassivePriv *priv = sock->priv;
-
- return priv->reliable;
+ return TRUE;
}
static gboolean
G_BEGIN_DECLS
-NiceSocket * nice_tcp_passive_socket_new (GMainContext *ctx, NiceAddress *addr,
- gboolean reliable);
+NiceSocket * nice_tcp_passive_socket_new (GMainContext *ctx, NiceAddress *addr);
NiceSocket * nice_tcp_passive_socket_accept (NiceSocket *socket);
global_mainloop = g_main_loop_new (NULL, FALSE);
/* step: create the agents L and R */
- lagent = nice_agent_new_reliable (g_main_loop_get_context (global_mainloop),
+ lagent = nice_agent_new (g_main_loop_get_context (global_mainloop),
NICE_COMPATIBILITY_RFC5245);
- ragent = nice_agent_new_reliable (g_main_loop_get_context (global_mainloop),
+ ragent = nice_agent_new (g_main_loop_get_context (global_mainloop),
NICE_COMPATIBILITY_RFC5245);
- g_object_set (G_OBJECT (lagent), "ice-udp", FALSE, NULL);
- g_object_set (G_OBJECT (ragent), "ice-udp", FALSE, NULL);
+ g_object_set (G_OBJECT (lagent), "ice-udp", FALSE, NULL);
+ g_object_set (G_OBJECT (ragent), "ice-udp", FALSE, NULL);
nice_agent_set_software (lagent, "Test-icetcp, Left Agent");
nice_agent_set_software (ragent, "Test-icetcp, Right Agent");
nice_address_init (&tmp);
passive_sock = nice_tcp_passive_socket_new (g_main_loop_get_context (mainloop),
- &passive_bind_addr, TRUE);
+ &passive_bind_addr);
g_assert (passive_sock);
srv_listen_source = g_socket_create_source (passive_sock->fileno,
g_source_attach (srv_listen_source, g_main_loop_get_context (mainloop));
active_sock = nice_tcp_active_socket_new (g_main_loop_get_context (mainloop),
- &active_bind_addr, TRUE);
+ &active_bind_addr);
g_assert (active_sock);
client = nice_tcp_active_socket_connect (active_sock, &passive_bind_addr);