[En-Nut-Discussion] Generating socket events

Matthias Ringwald mringwal at inf.ethz.ch
Wed Oct 27 09:50:06 CEST 2004


hi trevor

there's no direct way to have nut/os call your event handler, but you 
can always create one (or more threads) to realize that
your socket events occured (I've never used an ethernut board or tcp/ip 
btw) and call your handlers. If you need more than one
thread you should think about using a NutMutex to assure only one 
handler is processed at a time.

matthias

On 27.10.2004, at 01:16, Trevor O'Grady wrote:

>
> I have an existing FTP client that works over an event driven OS and 
> hence is implemented as a  state machine. Is there a way to get  
> ETHERNUT to generate the socket events so that I don't have to rewrite 
> my code to use blocking functions? These are the sort of event 
> functions I need to call in my code when socket events occur.
>
> ftpSocketConnectEv( int socket )
> ftpSocketDataInEv( int socket, char *data, int len )
> ftpSocketDataSendEv( int socket )
> ftpScoketCloseEv( int Socket )
>
> I know this is not how ETHERNUT normally works but it would be a shame 
> not to be able to use code that is tested and working. Any help 
> greatly appreciated.
>
> Regards
> Trevor
>
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion




More information about the En-Nut-Discussion mailing list