[En-Nut-Discussion] Generating socket events

Trevor O'Grady togrady at comtech.uk.com
Fri Oct 29 14:06:02 CEST 2004


Ole, thanks for your reply.
I thought that NutTcpSend does not block (I could be wrong) so how do I do a
blocking send?

Cheers
Trevor

-----Original Message-----
From: Ole Reinhardt [mailto:ole.reinhardt at r-web.de]
Sent: 29 October 2004 10:44
To: togrady at comtech.uk.com; Ethernut User Chat (English)
Subject: RE: [En-Nut-Discussion] Generating socket events


Hello,

> to send a lot of data over a slow link (e.g. ppp) - does NutTcpSEnd block
> until it has sent a packet or something?

This should be easy too. You only need to create an extra buffer you
will write in. Now your control thread could send data (blocking) and
create an event if there is again space in your buffer. So it would not
matter to use a blocking send function because this is done in your
control thread. Your FTP application will receive the empty event if the
control thread has consumed enough data out of your buffer.

Hops this will help,

Ole

--
 _________________________________________________________________
|                                                                 |
| WWW.R-WEB.DE         Systementwicklung, Softwareentwicklung     |
|                                                                 |
| Ole Reinhardt                                                   |
| Luisenstraße 29      Tel. / Fax:        +49 (0)271  7420433     |
| 57076 Siegen         Mobil:             +49 (0)177  7420433     |
| Germany                              ole.reinhardt at r-web.de     |
|_________________________________________________________________|

---


---




More information about the En-Nut-Discussion mailing list