static int StartBindTransaction(int n) { n = 0; // hardcoded for now... TODO: fixme CurrAppCtx.a = AppCtx[n].a = 100+n; CurrAppCtx.b = AppCtx[n].b = 200+n; /* kick off stun */ return StunClient_startBindTransaction(stunInstance, NULL, (struct sockaddr *)&stunServerAddr, NULL, false, "pem", "pem", 0, // uint32_t 1845494271 (priority) false, false, 0, // uint64_t 0x932FF9B151263B36LL (tieBreaker) LastTransId, 0, /* socket */ SendRawStun, /* send func */ StunStatusCallBack, NULL); }
ICELIB_Result sendConnectivityCheck(void* pUserData, int proto, int socket, const struct sockaddr* destination, const struct sockaddr* source, uint32_t userValue1, uint32_t userValue2, uint32_t componentId, bool useRelay, const char* pUfrag, const char* pPasswd, uint32_t peerPriority, bool useCandidate, bool iceControlling, bool iceControlled, uint64_t tieBreaker, StunMsgId transactionId) { (void)userValue1; (void)userValue2; (void)componentId; (void)iceControlled; struct prg_data* prg = pUserData; TransactionAttributes transAttr; transAttr.transactionId = transactionId; transAttr.sockhandle = socket; strncpy(transAttr.username, pUfrag, STUN_MSG_MAX_USERNAME_LENGTH); strncpy(transAttr.password, pPasswd, STUN_MSG_MAX_PASSWORD_LENGTH); transAttr.peerPriority = peerPriority; transAttr.useCandidate = useCandidate; transAttr.iceControlling = iceControlling; transAttr.tieBreaker = tieBreaker; /* kick off stun */ int32_t ret = StunClient_startBindTransaction(prg->mediaCnf->stunInstance, pUserData, destination, source, proto, useRelay, &transAttr, sendPacket, stunStatusCallBack); return ret; }
static int StartDiscussBindTransaction(int n) { n = 0; // hardcoded for now... TODO: fixme CurrAppCtx.a = AppCtx[n].a = 100+n; CurrAppCtx.b = AppCtx[n].b = 200+n; discussData.streamType=0x004; discussData.interactivity=0x01; discussData.networkStatus_flags = 0; discussData.networkStatus_nodeCnt = 0; discussData.networkStatus_tbd = 0; discussData.networkStatus_upMaxBandwidth = 0; discussData.networkStatus_downMaxBandwidth = 0; /* kick off stun */ return StunClient_startBindTransaction(stunInstance, NULL, (struct sockaddr *)&stunServerAddr, NULL, false, "pem", "pem", 0, // uint32_t 1845494271 (priority) false, false, 0, // uint64_t 0x932FF9B151263B36LL (tieBreaker) LastTransId, 0, /* socket */ SendRawStun, /* send func */ StunStatusCallBack, &discussData); }