[fpc-pascal] Designing socket agnostic library
ludo.brands at free.fr
Tue May 10 11:29:04 CEST 2011
If you want to make a network agnostic api you should define it at a higher
level than you started to do. Something on a stream level. If you need the
lower level socket calls, stick to the standard Berkeley socket API and
don't re-invent the wheel. Fe: listen with port and ip parameter just to get
rid of bind is looking for problems.
Note also that you have blocking and non blocking socket libraries (some
support both). Your VOIP library will probably change a lot if you use one
or the other blocking mode. Another reason to not make the network
abstraction at that level.
De : fpc-pascal-bounces at lists.freepascal.org
[mailto:fpc-pascal-bounces at lists.freepascal.org] De la part de ik
Envoyé : mardi 10 mai 2011 00:30
À : FPC-Pascal users discussions
Objet : [fpc-pascal] Designing socket agnostic library
This question is a bit off topic, but not completely.
I decided to create my own SIP (and other VoIP) library that is open source
(Dual license of both Mozilla and GPL).
I want that the only thing that the library will do is to have
implementation of the VoIP protocols such as SIP, RTP etc..
Another reason is that I do not want to create yet another socket library or
a voice/image library,
only to work on the protocols themselves allowing everyone to choose their
own preferred library to the other tasks.
That way it will be real cross platform library that can be used everywhere
that FPC can be used.
Now the question is how can I create an agnostic API without create a socket
like library skeleton that I'll use in my code, like I started
to do already ?
LINESIP - Opening the source for communication
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal