Ignore:
Timestamp:
Feb 18, 2011, 12:36:19 AM (11 years ago)
Author:
jch
Message:

Implement outgoing uTP connections.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/net.c

    r11709 r11933  
    4646
    4747#include <event2/util.h>
     48#include <libutp/utp.h>
    4849
    4950#include "transmission.h"
     
    5152#include "natpmp.h"
    5253#include "net.h"
     54#include "tr-utp.h"
    5355#include "peer-io.h"
    5456#include "platform.h"
     
    348350
    349351    return s;
     352}
     353
     354struct UTPSocket *
     355tr_netOpenPeerUTPSocket( tr_session        * session,
     356                         const tr_address  * addr,
     357                         tr_port             port,
     358                         tr_bool             clientIsSeed UNUSED )
     359{
     360    struct sockaddr_storage ss;
     361    socklen_t sslen;
     362    sslen = setup_sockaddr( addr, port, &ss );
     363
     364    return UTP_Create( tr_utpSendTo, (void*)session,
     365                       (struct sockaddr*)&ss, sslen );
    350366}
    351367
Note: See TracChangeset for help on using the changeset viewer.