sctp

How are data channels negotiated between two peers with WebRTC?

核能气质少年 提交于 2019-12-10 17:23:54
问题 The WebRTC RTCPeerConnection interface has a createDataChannel method and an ondatachannel event handler. How do these interact? How do I create a single data channel that can be used to send/receive data between two peers? Also, the RTCDataChannelInit constructor has a negotiated field, which by default is set to false and says it results in the channel being announced in-band. What happens if it's set to true ? 回答1: Firstly: to create any data channel, the peers need to exchange an SDP

SCTP with Multihoming as a Drop In Replacement for TCP

為{幸葍}努か 提交于 2019-12-09 10:43:45
问题 SCTP has native multi-homing support which if I understand it correctly will automatically reroute your packets over a secondary NIC if the primary interface goes down. I duplicated this functionality with TCP by writing a custom routing deamon to modify the routing tables if my primary NIC goes down. I would like to try using SCTP instead. In Steven's Unix Network Programming V1 3rd Edition on page 288 it says: For this example, we use a one-to-many-style server. We make this choice for one

SCTP RCVBUF is not set properly in Linux

浪尽此生 提交于 2019-12-08 04:32:35
问题 I am trying to set RCVBUF to 1MB//1048576 , But after setting the value when I am trying to read it through getsockopt it always gives the value as 2MB//2097152 could anyone let me know what is the problem with the below code? unsigned int rcvBuf = getRcvBufValue(); if (setsockopt (channelfd, SOL_SOCKET, SO_RCVBUF, &rcvBuf,sizeof (rcvBuf)) == -1) { cout<<"RCV BUF IS NOT SET"; } int rcvbuf = -1; socklen_t Rsize = sizeof(rcvbuf); getsockopt (channelfd, SOL_SOCKET, SO_RCVBUF,&rcvbuf,&Rsize);

SCTP RCVBUF is not set properly in Linux

梦想与她 提交于 2019-12-06 16:21:43
I am trying to set RCVBUF to 1MB//1048576 , But after setting the value when I am trying to read it through getsockopt it always gives the value as 2MB//2097152 could anyone let me know what is the problem with the below code? unsigned int rcvBuf = getRcvBufValue(); if (setsockopt (channelfd, SOL_SOCKET, SO_RCVBUF, &rcvBuf,sizeof (rcvBuf)) == -1) { cout<<"RCV BUF IS NOT SET"; } int rcvbuf = -1; socklen_t Rsize = sizeof(rcvbuf); getsockopt (channelfd, SOL_SOCKET, SO_RCVBUF,&rcvbuf,&Rsize); cout<<rcvbuf; Here is what is said in man 7 socket regarding SO_RCVBUF option: SO_RCVBUF Sets or gets the

SCTP 库的简述和代码 (4)

試著忘記壹切 提交于 2019-12-06 04:16:47
2 定时器 简单的时间轮. 使用时间轮是因为, 定时器数目可能比较大. 要求使用者周期性调用, p_timer_wheel_hb 缺点是, 不精确. /* Hash table for hold timer list */ static list_header wheel_slot[WHEEL_ELEM]; static unsigned int svd_tick; static int cur_slot = 0; #ifndef WIN32 unsigned int GetTickCount() { struct timeval current; unsigned int cur_time; gettimeofday(&current, NULL); cur_time = current.tv_sec*1000 + current.tv_usec/1000; return cur_time; } #endif unsigned int get_cur_time() { return GetTickCount(); } void p_timer_restart (p_timer_t *new_timer) { int target_slot; list_header *timer_list; assert(new_timer); target_slot = (cur_slot +

SCTP 库的简述和代码 (3)

∥☆過路亽.° 提交于 2019-12-06 04:16:37
--- 如转请保留作者信息 jundai2009@gmail.com 接这上回说, 上面, g_sctp_fsm 是状态列表入口, 不同的状态下,处理网络包的方法不一样, 就是说处理的API不一样, 那这API就在这里选择. 状态表格中, 左边fsm_handler_fn 是执行动作, 右边是下面将要进入的状态. 关于这个库的状态机设计, 还有下面两个比较重要的宏 #define SCTP_TRANSFER_STATE(assoc, new_state) do {\ if ((assoc)->cur_state != new_state) {\ sctp_enter_state(assoc, new_state);\ assoc->cur_state = new_state;\ }\ }while(0); #define SCTP_PROC_PKG(instance, assoc, pkg, parsed_info, new_assoc) do {\ sctp_state old_state, new_state; \ old_state = (assoc) ? (assoc->cur_state):SCTP_STATE_CLOSED;\ new_state = (g_sctp_fsm[old_state] + (pkg))->new_state;\ new_assoc =

DTLS over SCTP using OpenSSL

妖精的绣舞 提交于 2019-12-05 07:27:49
问题 I am wanting to write an application that uses OpenSSL to take advantage of it's DTLS support over SCTP. I am using Ubuntu 13.10. I have downloaded and successfully compiled LKSCTP 1.0.15 and OpenSSL 1.0.1e. I compiled OpenSSL with ./config sctp. I can compile the samples provided on http://sctp.fh-muenster.de/, however when I try to execute any of them, they fail at the assertion below. The error message is: bss_dgram.c(897): OpenSSL internal error, assertion failed: ret > 0 The error

DTLS over SCTP using OpenSSL

霸气de小男生 提交于 2019-12-03 21:29:47
I am wanting to write an application that uses OpenSSL to take advantage of it's DTLS support over SCTP. I am using Ubuntu 13.10. I have downloaded and successfully compiled LKSCTP 1.0.15 and OpenSSL 1.0.1e. I compiled OpenSSL with ./config sctp. I can compile the samples provided on http://sctp.fh-muenster.de/ , however when I try to execute any of them, they fail at the assertion below. The error message is: bss_dgram.c(897): OpenSSL internal error, assertion failed: ret > 0 The error encounter by the setsockopt is "Permission denied". Here is the code that fails in function BIO_new_dgram

SCTP with Multihoming as a Drop In Replacement for TCP

一世执手 提交于 2019-12-03 14:08:00
SCTP has native multi-homing support which if I understand it correctly will automatically reroute your packets over a secondary NIC if the primary interface goes down. I duplicated this functionality with TCP by writing a custom routing deamon to modify the routing tables if my primary NIC goes down. I would like to try using SCTP instead. In Steven's Unix Network Programming V1 3rd Edition on page 288 it says: For this example, we use a one-to-many-style server. We make this choice for one important reason. The examples in Chapter 5 can be modified to run over SCTP with one minor change:

What kind of SCTP support is there on various Windows versions?

梦想与她 提交于 2019-12-03 09:21:02
问题 What kind of SCTP support is there on various Windows versions? 回答1: Out of the box, there are none, on any versions of Windows.(Microsoft has claimed there is no customer demand, so I always encourage anyone looking for SCTP on windows contact Microsoft and express their need for one..) There are 3rd party implementations, e.g. sctplib SctpDrv 回答2: Recently, Windows support has been added to this userspace SCTP stack: http://sctp.fh-muenster.de/sctp-user-land-stack.html It will have a paper