<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=953360909-10052011><FONT face=Arial color=#0000ff size=2>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. </FONT></SPAN></DIV>
<DIV><SPAN class=953360909-10052011><FONT face=Arial color=#0000ff size=2>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.</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=OutlookMessageHeader lang=fr dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Message d'origine-----<BR><B>De :</B> 
  fpc-pascal-bounces@lists.freepascal.org 
  [mailto:fpc-pascal-bounces@lists.freepascal.org] <B>De la part de</B> 
  ik<BR><B>Envoyé :</B> mardi 10 mai 2011 00:30<BR><B>À :</B> 
  FPC-Pascal users discussions<BR><B>Objet :</B> [fpc-pascal] Designing 
  socket agnostic library<BR><BR></FONT></DIV>
  <DIV dir=ltr>Hello,<BR><BR>This question is a bit off topic, but not 
  completely. <BR>I decided to create my own SIP (and other VoIP) library that 
  is open source (Dual license of both Mozilla and GPL).<BR>I want that the only 
  thing that the library will do is to have implementation of the VoIP protocols 
  such as SIP, RTP etc.. <BR>Another reason is that I do not want to create yet 
  another socket library or a voice/image library, <BR>only to work on the 
  protocols themselves allowing everyone to choose their own preferred library 
  to the other tasks.<BR>That way it will be real cross platform library that 
  can be used everywhere that FPC can be used.<BR><BR>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 <A 
  href="https://github.com/ik5/fpVoIP/blob/master/src/lib/sockets/fpsocket_api.pas">started</A> 
  to do already ?<BR><BR>Thanks,<BR>Ido<BR><BR clear=all>
  <DIV dir=ltr>LINESIP - Opening the source for communication<BR><A 
  href="http://www.linesip.com" target=_blank>http://www.linesip.com</A><BR><A 
  href="http://www.linesip.co.il" 
  target=_blank>http://www.linesip.co.il</A><BR><BR></DIV><BR></DIV></BLOCKQUOTE></BODY></HTML>