Hello,
In both rtpproxy and rtpengine modules, they use SOCK_DGRAM type to
connect to their sockets. At some lines below, they use connect
command to connect to RTP proxy,too.
Why they use this command "connect" while their socket type are connectionless?
Another question is at send_rtpp_command function, when both module
want to send command to RTPProxy, why they create another stream
socket (AF_LOCAL)?
fd = socket(AF_LOCAL, SOCK_STREAM, 0);
These question have raised because in LRE module which i have been
developing on it, i need to found out the LRE module can't connect to
LRE_Proxy.
Actually when i want to send a command to LRE_Proxy with "write"
command which it's socket had disconnected before, I didn't get any
error! I have faced with this problem. It's strange why in both
rtpengine and rtpproxy modules it works!
do {
len = writev(fd, v + 1, vcnt - 1);
} while (len == -1 && errno == EINTR);
if (len <= 0) {
close(fd);
LM_ERR("can't send command to a RTP proxy\n");
goto badproxy;
}
Would you please help me.
With Best Regards.
--
--Mojtaba Esfandiari.S
Show replies by date