<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for lNet - Lightweight networking library</title>
	<atom:link href="http://lnet.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://lnet.wordpress.com</link>
	<description>Networking for pros</description>
	<lastBuildDate>Thu, 24 Dec 2009 11:52:44 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Sockets, Protocols and Sending by John vd Waeter</title>
		<link>http://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-960</link>
		<dc:creator>John vd Waeter</dc:creator>
		<pubDate>Thu, 24 Dec 2009 11:52:44 +0000</pubDate>
		<guid isPermaLink="false">http://lnet.wordpress.com/?page_id=43#comment-960</guid>
		<description>Wait, solved!
Nothing wrong with UPD. I just didn&#039;t realize one thread could catch up with another thread and read buffers that where not finished filling by another thread...</description>
		<content:encoded><![CDATA[<p>Wait, solved!<br />
Nothing wrong with UPD. I just didn&#8217;t realize one thread could catch up with another thread and read buffers that where not finished filling by another thread&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Sockets, Protocols and Sending by John vd Waeter</title>
		<link>http://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-959</link>
		<dc:creator>John vd Waeter</dc:creator>
		<pubDate>Thu, 24 Dec 2009 10:55:54 +0000</pubDate>
		<guid isPermaLink="false">http://lnet.wordpress.com/?page_id=43#comment-959</guid>
		<description>Hi,

Using a lNet UDP, created in a thread in a Lazarus/FPC linux console application.

The UDP acts as a server.
It receives a question and puts in a buffer. Another thread handles the buffer, gets the answer and put it back in a buffer. There it is picked up by the UDP&#039;s thread and sent to the client.

I try to send using 

  ActSent:= Send(Buffer, sizeof(buffer), Peer);

Buffer allways has the same size: 116
Peer has ip:port
Works ok, except occasionally actsent = 114 instead of 116.
This happens abt 3 on 10000 times. Not bad really, but I don&#039;t understand.
Speed is no issue, it happens both at a rate of abt 10 packets/s as on 100 packets/s.

The connection between the clientpc and the serverpc is a 100 MBit lan, that should handle this traffic easy.

No OnErrors are triggered.

If I increase the size from 116 to 216, it reports actsent=214. Again 2 bytes missing... what could be the issue?

tia!
John</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Using a lNet UDP, created in a thread in a Lazarus/FPC linux console application.</p>
<p>The UDP acts as a server.<br />
It receives a question and puts in a buffer. Another thread handles the buffer, gets the answer and put it back in a buffer. There it is picked up by the UDP&#8217;s thread and sent to the client.</p>
<p>I try to send using </p>
<p>  ActSent:= Send(Buffer, sizeof(buffer), Peer);</p>
<p>Buffer allways has the same size: 116<br />
Peer has ip:port<br />
Works ok, except occasionally actsent = 114 instead of 116.<br />
This happens abt 3 on 10000 times. Not bad really, but I don&#8217;t understand.<br />
Speed is no issue, it happens both at a rate of abt 10 packets/s as on 100 packets/s.</p>
<p>The connection between the clientpc and the serverpc is a 100 MBit lan, that should handle this traffic easy.</p>
<p>No OnErrors are triggered.</p>
<p>If I increase the size from 116 to 216, it reports actsent=214. Again 2 bytes missing&#8230; what could be the issue?</p>
<p>tia!<br />
John</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Sockets, Protocols and Sending by almindor</title>
		<link>http://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-944</link>
		<dc:creator>almindor</dc:creator>
		<pubDate>Sat, 07 Nov 2009 12:07:10 +0000</pubDate>
		<guid isPermaLink="false">http://lnet.wordpress.com/?page_id=43#comment-944</guid>
		<description>By the looks of things you&#039;re mixing two event manager principles here, let me explain.

In non-visual programs (things without forms and TApplication) you use CallAction directly to integrate lNet event handling (OnXXX calls) into your main loop.

In visual apps (TApplication/TForm etc.) lNet integrates itself automatically. You just have to assign and handle the OnXXX events, and not call CallAction.</description>
		<content:encoded><![CDATA[<p>By the looks of things you&#8217;re mixing two event manager principles here, let me explain.</p>
<p>In non-visual programs (things without forms and TApplication) you use CallAction directly to integrate lNet event handling (OnXXX calls) into your main loop.</p>
<p>In visual apps (TApplication/TForm etc.) lNet integrates itself automatically. You just have to assign and handle the OnXXX events, and not call CallAction.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Sockets, Protocols and Sending by Enrico Pergola</title>
		<link>http://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-942</link>
		<dc:creator>Enrico Pergola</dc:creator>
		<pubDate>Wed, 04 Nov 2009 11:17:39 +0000</pubDate>
		<guid isPermaLink="false">http://lnet.wordpress.com/?page_id=43#comment-942</guid>
		<description>Hi

I made a client app for WINCE by cloning and modifying the sample lclient in the lnet demos. I have 2 major problems (maybe is lnet unstable in Wince?)
 
1.OnConnect. 
procedure TLTCPTest.OnCon(aSocket: TLSocket);
begin
  showmessage( &#039;Connected&#039;); // inform user of successful connect
  FConConnected := True;  // this ia a boolean I added
end;  
 I call connect() like this:
....
 if FCon.Connect(Address, p) then  begin // if connect went ok
    Fquit := False;
    p     := 1;
    repeat
      FCon.CallAction; // wait for &quot;OnConnect&quot;
      Inc(p);
    until FConConnected or Fquit;
    Result := FConConnected;//not FQuit;
  end;     
This ALWAYS connects, even when the the server application is not even running. What am I doing wrong?
2. OnCanSend;
This is another mistery.
I call initialize the event like this (as per the sample on this web page)
FCon.OnCansend(Fcon.iterator);  
and this is the method:
procedure TLTCPTest.CanSend(aSocket: TLSocket);
var
  Sent: integer =0; // number of bytes sent each try
  TempBuffer: string = &#039;&#039;;
 begin
  repeat
    if Length(TempBuffer) = 0 then
      TempBuffer := GetNewChunk; // get next chunk if we sent all from the l
    Sent := FCon.SendMessage(TempBuffer, aSocket);
showmessage(&#039;sent= &#039;+inttostr(sent));
    // remember, don&#039;t use the aSocket directly!
    Delete(TempBuffer, 1, Sent); // delete all we sent from our temporary buffer!
  until (Sent = 0) or (Send_Str = &#039;&#039;); // try to send until you can&#039;t send anymore 

And this is the
function GetNewChunk: string;
begin
  Result := copy(Send_Str, 1, 16000);
  Delete(Send_Str, 1, 16000);
end;        

Well, the thing is, if the showmessage stays there, all works fine, BUT when I comment that out, the OnCanSend returns a Sent =0 in the middle, i.e. it successfully sends part of the Send_Str, then it exit without finishing.
What am I doing wrong here?
I would greatly appreciate any help.
Thanks</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I made a client app for WINCE by cloning and modifying the sample lclient in the lnet demos. I have 2 major problems (maybe is lnet unstable in Wince?)</p>
<p>1.OnConnect.<br />
procedure TLTCPTest.OnCon(aSocket: TLSocket);<br />
begin<br />
  showmessage( &#8216;Connected&#8217;); // inform user of successful connect<br />
  FConConnected := True;  // this ia a boolean I added<br />
end;<br />
 I call connect() like this:<br />
&#8230;.<br />
 if FCon.Connect(Address, p) then  begin // if connect went ok<br />
    Fquit := False;<br />
    p     := 1;<br />
    repeat<br />
      FCon.CallAction; // wait for &#8220;OnConnect&#8221;<br />
      Inc(p);<br />
    until FConConnected or Fquit;<br />
    Result := FConConnected;//not FQuit;<br />
  end;<br />
This ALWAYS connects, even when the the server application is not even running. What am I doing wrong?<br />
2. OnCanSend;<br />
This is another mistery.<br />
I call initialize the event like this (as per the sample on this web page)<br />
FCon.OnCansend(Fcon.iterator);<br />
and this is the method:<br />
procedure TLTCPTest.CanSend(aSocket: TLSocket);<br />
var<br />
  Sent: integer =0; // number of bytes sent each try<br />
  TempBuffer: string = &#8221;;<br />
 begin<br />
  repeat<br />
    if Length(TempBuffer) = 0 then<br />
      TempBuffer := GetNewChunk; // get next chunk if we sent all from the l<br />
    Sent := FCon.SendMessage(TempBuffer, aSocket);<br />
showmessage(&#8217;sent= &#8216;+inttostr(sent));<br />
    // remember, don&#8217;t use the aSocket directly!<br />
    Delete(TempBuffer, 1, Sent); // delete all we sent from our temporary buffer!<br />
  until (Sent = 0) or (Send_Str = &#8221;); // try to send until you can&#8217;t send anymore </p>
<p>And this is the<br />
function GetNewChunk: string;<br />
begin<br />
  Result := copy(Send_Str, 1, 16000);<br />
  Delete(Send_Str, 1, 16000);<br />
end;        </p>
<p>Well, the thing is, if the showmessage stays there, all works fine, BUT when I comment that out, the OnCanSend returns a Sent =0 in the middle, i.e. it successfully sends part of the Send_Str, then it exit without finishing.<br />
What am I doing wrong here?<br />
I would greatly appreciate any help.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Sockets, Protocols and Sending by didiergm</title>
		<link>http://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-938</link>
		<dc:creator>didiergm</dc:creator>
		<pubDate>Thu, 29 Oct 2009 17:46:12 +0000</pubDate>
		<guid isPermaLink="false">http://lnet.wordpress.com/?page_id=43#comment-938</guid>
		<description>Almindor,

Have you got any news about these tutorials ? Sending form fields and uploading files is what I would like to use lNet for on Mac, Win and Linux; lNet is so far the most promising and light weight suite for Lazarus. Please keep up the good work :)</description>
		<content:encoded><![CDATA[<p>Almindor,</p>
<p>Have you got any news about these tutorials ? Sending form fields and uploading files is what I would like to use lNet for on Mac, Win and Linux; lNet is so far the most promising and light weight suite for Lazarus. Please keep up the good work <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Sockets, Protocols and Sending by almindor</title>
		<link>http://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-921</link>
		<dc:creator>almindor</dc:creator>
		<pubDate>Tue, 22 Sep 2009 07:49:57 +0000</pubDate>
		<guid isPermaLink="false">http://lnet.wordpress.com/?page_id=43#comment-921</guid>
		<description>Hey, I&#039;m not sure what IdHttp is, but you can GET/POST with lNet. I&#039;ll try to get Micha (the author of HTTP code in lNet) to write a tutorial on these things since people ask about it a lot.</description>
		<content:encoded><![CDATA[<p>Hey, I&#8217;m not sure what IdHttp is, but you can GET/POST with lNet. I&#8217;ll try to get Micha (the author of HTTP code in lNet) to write a tutorial on these things since people ask about it a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Roadmap by almindor</title>
		<link>http://lnet.wordpress.com/development/roadmap/#comment-899</link>
		<dc:creator>almindor</dc:creator>
		<pubDate>Thu, 20 Aug 2009 09:46:12 +0000</pubDate>
		<guid isPermaLink="false">http://lnet.wordpress.com/development/roadmap/#comment-899</guid>
		<description>Everything works for me with latest trunk (2.5.1). Can you please recheck? Also write more details (exact error, where it happened, when) to my mail.</description>
		<content:encoded><![CDATA[<p>Everything works for me with latest trunk (2.5.1). Can you please recheck? Also write more details (exact error, where it happened, when) to my mail.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Roadmap by LacaK</title>
		<link>http://lnet.wordpress.com/development/roadmap/#comment-897</link>
		<dc:creator>LacaK</dc:creator>
		<pubDate>Thu, 20 Aug 2009 08:44:12 +0000</pubDate>
		<guid isPermaLink="false">http://lnet.wordpress.com/development/roadmap/#comment-897</guid>
		<description>lNet cann&#039;t compile using FPC &gt;= 2.3.1
Error: absolute can only be associated with a var or const
http://wiki.lazarus.freepascal.org/User_Changes_Trunk#Absolute_variable_declarations
Any plans to fix it ? or how to workaround ?
TIA
-Laco.</description>
		<content:encoded><![CDATA[<p>lNet cann&#8217;t compile using FPC &gt;= 2.3.1<br />
Error: absolute can only be associated with a var or const<br />
<a href="http://wiki.lazarus.freepascal.org/User_Changes_Trunk#Absolute_variable_declarations" rel="nofollow">http://wiki.lazarus.freepascal.org/User_Changes_Trunk#Absolute_variable_declarations</a><br />
Any plans to fix it ? or how to workaround ?<br />
TIA<br />
-Laco.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Sockets, Protocols and Sending by edwin</title>
		<link>http://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-783</link>
		<dc:creator>edwin</dc:creator>
		<pubDate>Sat, 18 Jul 2009 13:33:02 +0000</pubDate>
		<guid isPermaLink="false">http://lnet.wordpress.com/?page_id=43#comment-783</guid>
		<description>Hi!
 I am newbie with Lnet. I used Indy components in delphi for calls to http to post information. I want to replace this component for lnet to use IDHttp but I dont find information how to use Idhttp. It works like idhhtp from indy?

With idhhtp i Can send post/get information to web page and receive the answer in a variable . Can i do this with lnet??</description>
		<content:encoded><![CDATA[<p>Hi!<br />
 I am newbie with Lnet. I used Indy components in delphi for calls to http to post information. I want to replace this component for lnet to use IDHttp but I dont find information how to use Idhttp. It works like idhhtp from indy?</p>
<p>With idhhtp i Can send post/get information to web page and receive the answer in a variable . Can i do this with lnet??</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Sockets, Protocols and Sending by M Dovdovan</title>
		<link>http://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-656</link>
		<dc:creator>M Dovdovan</dc:creator>
		<pubDate>Fri, 12 Jun 2009 14:19:43 +0000</pubDate>
		<guid isPermaLink="false">http://lnet.wordpress.com/?page_id=43#comment-656</guid>
		<description>Thank you, Almindor! 
The LNET seems to fit our needs exactly, the only glitch is the odd five file uploat limit. 
What have I mangled? 
System:
	Linux Fedora, 
	Gnome, 
	FPC 2.2.2, 
	Lazarus 9.26.2
	INet: //kept the default values
		pipeline - false
		startpoint - 1025
		transfer method - ftpassive

The upload procedure looks at a ListBox with the names of image files and uploads each file.  The files are small - usually less than 50K each. There can be several or many at an upload.  People send them, and we add them to the database and upload them to the web site. 

Meanwhile, as a workaround, I&#039;ve been processing two files and uploading them to stay under the five file upload limit, since each file is uploaded as a small version and a large version, (removed the small version code from code below) 

Everything seems to work, except that it stops at five files. It looks at the ListBox and reads the file names, but the upload stops. I tested to see if a file is stopping it, by using a different set of files, and same thing happens...

This code is mostly the same as the LNET FTP example. What can be incorrect? 
I tried sending the code with this letter several times, but is there a limit on size of messages?</description>
		<content:encoded><![CDATA[<p>Thank you, Almindor!<br />
The LNET seems to fit our needs exactly, the only glitch is the odd five file uploat limit.<br />
What have I mangled?<br />
System:<br />
	Linux Fedora,<br />
	Gnome,<br />
	FPC 2.2.2,<br />
	Lazarus 9.26.2<br />
	INet: //kept the default values<br />
		pipeline &#8211; false<br />
		startpoint &#8211; 1025<br />
		transfer method &#8211; ftpassive</p>
<p>The upload procedure looks at a ListBox with the names of image files and uploads each file.  The files are small &#8211; usually less than 50K each. There can be several or many at an upload.  People send them, and we add them to the database and upload them to the web site. </p>
<p>Meanwhile, as a workaround, I&#8217;ve been processing two files and uploading them to stay under the five file upload limit, since each file is uploaded as a small version and a large version, (removed the small version code from code below) </p>
<p>Everything seems to work, except that it stops at five files. It looks at the ListBox and reads the file names, but the upload stops. I tested to see if a file is stopping it, by using a different set of files, and same thing happens&#8230;</p>
<p>This code is mostly the same as the LNET FTP example. What can be incorrect?<br />
I tried sending the code with this letter several times, but is there a limit on size of messages?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
