![]() |
|
|||||||
| Register | FAQ | The Twelve Commandments | Members List | Calendar | Arcade | Find the Best VPN | Today's Posts | Search |
| General Gnutella Development Discussion For general discussion about Gnutella development. |
![]() |
|
|
Thread Tools | Display Modes |
|
#11
|
||||
|
||||
|
Hi Max,
no there isn't a build-in solution, you have to do that on your own right now. Okay, I came to the conclusion that original CAsyncSocket isn't good enough. I did run into so many problems which could not be solved in an elegant way together with the existing class and methods. Problem number 1 are things that take time and so do not match to the nature of an asynchronous-non-blocking class: no solution for friendly TCP disconnect and DNS resolutions. Problem number 2 is the fact that the class does not work with multithreading -or- it does not provide access to an internal message queue (much better to avoid all semaphore difficulties) and optional control via an external heartbeat. So that finally all critical can be easily done within same thread context. If you tried once to close sockets from another thread you will see what I mean (nasty MFC assert). Problem number 3 is the lack of comfortable functions for socket status requests, buffer management and build-in proxy support. Advanced users of a socket class will miss those things and typically have to reimplement them in every project. I have to say CAsnycSocket is nice, but suboptimal, an upgrade is highly necesarry IMHO. Well, now that I'm nearly finished with my test software (still trying to find more weak points)... I can spend the next months spare time with an implementation of an own and improved socket class. For sure Mutella's socket class is a good starting point. Greets, Moak PS: Max, I'm outa active Gnutella development ... I described my problems with this community in another thread. But I wanted to give some feedback here, I still work on network classes. Last edited by Moak; March 12th, 2002 at 07:23 AM. |
|
#12
|
|||
|
|||
|
Quote:
with regard to closing sockets i wasn't talking about CAsyncSoclet, but about sockets in general. Looks like there is no elegant way to do it at all -- neither poll(), nor select() provide support for safe-async-close, so the only solution I see is to call ioctl() in 'OnTimer()' or in 'Heartbeat()' to see if send buffer of the socket we'd like to close has cleared up... regards, still hope to see you around --Max |
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What posts belong in this General Gnutella / Gnutella Network Discussion section! | Lord of the Rings | General Gnutella / Gnutella Network Discussion | 0 | November 17th, 2005 06:54 AM |
| Gnutella core TCP blocking issue? | romsla | General Linux Support | 0 | December 13th, 2003 04:00 AM |
| Programming a Gnutella client, part I | Moak | General Gnutella Development Discussion | 1 | April 3rd, 2002 11:36 PM |
| Best network client? | PhatPhreddy | General Gnutella / Gnutella Network Discussion | 2 | March 15th, 2002 11:02 AM |
| Need Gnutella client w/ ip filter, private network | Unregistered | General Discussion | 1 | December 3rd, 2001 10:20 PM |