libDataChannelPB WebRTC library

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 772
Joined: Fri Dec 04, 2015 9:26 pm

Re: libDataChannelPB WebRTC library

Post by skinkairewalker »

infratec wrote: Sat Feb 17, 2024 10:48 am For WebSockets you can also use the code from dadido3

https://www.purebasic.fr/english/viewtopic.php?p=592179

It is crosspaltform and PB only.

If you need it secured, you can use the libssl stuff by HexOr. Maybe.
From what I've already talked to dadido3, he's not interested in adding tls/ssl to his websocket...
It would be interesting to add TLS/SSL support natively to purebasic.
User avatar
idle
Always Here
Always Here
Posts: 5836
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: libDataChannelPB WebRTC library

Post by idle »

yes it would be good to have native ssl/tls but it still doesn't help with all the protocols, nor would it solve connection problems like if your behind a NAT. This is the distinction of this library it addresses the whole problem of making secure connections and is also solves making p2p connections using a very simple messaging API for websockets or datachannels that closely matches the JS apis found in browsers. The addition of audio and video channels doesn't add much overhead to the lib it's just protocols.
I don't think I need to elaborate on the uses of this library but it's by far the best networking lib I've ever come across and ticks every box ipv4/ipv6, TCP UDP, SSL/TLS, P2P via STUN/TURN, Multiplexing
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 772
Joined: Fri Dec 04, 2015 9:26 pm

Re: libDataChannelPB WebRTC library

Post by skinkairewalker »

something bothers me about libdatachannel, for example: on the udp server, the implementation is simple, practical and direct. similar to a TCP server however, with different behaviors... webrtc sounds very complex due to the STUN/TURN servers... there is little content explaining the real precept of implementation and usability. Based on your experience, how could I have a different view of webrtc as being more user-friendly than the ido socket built into purebasic?

Something tells me that it would be interesting to use enet for reliable udp…

Remembering that I consider myself a bit of a layman.
User avatar
idle
Always Here
Always Here
Posts: 5836
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: libDataChannelPB WebRTC library

Post by idle »

you only need stun for p2p connections when both peers are behind a NAT, if one can connect to the other it's not a problem.
and the data channels look to be easier to use than enet.
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 772
Joined: Fri Dec 04, 2015 9:26 pm

Re: libDataChannelPB WebRTC library

Post by skinkairewalker »

What about a large number of simultaneous connections?
for example, the reason I have a certain interest in udp socket is that in the future I want to take the risk of creating an mmo game. What I wanted was support to accept a considerable amount of connections (~500 to 1500) simultaneous connections.

Would libdatachannel face problems in these cases?
and in relation to protection against modification of message packets.
User avatar
idle
Always Here
Always Here
Posts: 5836
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: libDataChannelPB WebRTC library

Post by idle »

I have no idea how many clients it can have and if you want to encrypt data you can use modEC it implements Curve25519 which is the same used in TLS. you can do it with perfect forward secrecy if you hand out keys on registration
an example
https://www.purebasic.fr/english/viewto ... 66#p574766

the module
https://www.purebasic.fr/english/viewtopic.php?t=55892
Post Reply