From: Tim <t....@ze...> - 2003-05-15 07:23:51
|
Another item for the TODO List: How can the GUI detect an overnet core? When the JavaGUI connects to the core, the core does not identify itself as an overnet or eDonkey2000 core unfortunately. What I do in ed2k-gtk-gui is to send an 'advanced command' "g" to the core, which should result in two status messages from the core (ie. two line). If one of those two lines starts like this: ID: <32 hex digits, ie. 0-9,a-f,A-F> then it's an overnet core. An eDonkey core would return something like 'ClientID: <foo>' I think (or something similar). Note that you should not expect those two lines of output to arrive right away after you've sent the command - the core might send some other status messages before that. The only thing you know is that you get an answer and that the answer comes after you've sent the "g" command, but that's about it, so don't assume synchroneous communication. The GUI needs to know whether it deals with an overnet core for various reasons: * the file meta data is slightly different in overnet IIRC (e.g. the records data of the 'shared files' message and the 'new download' message will look slightly different). * the GUI must not under any circumstances send a search in overnet via the 'search' protocol message. This will crash an overnet core (or at least id did crash them in the past). At the moment only simple searches are possible for the overnet command line client, e.g. only for words. Extra search options won't work. Searches have to be sent to an overnet command line client via the 'advanced command' protocol message only, e.g.: s freebsd handbook or s linux What will not work is sth like 's -Audio foo' (at least it didn't last time I checked) * overnet will return search results the way eDonkey returned 'extended' search results (same protocol message), ie. one result per message. When dealing with an overnet core, the GUI must not assume that it will receive a 'proper' search results list before it receives 'extended' results. * overnet does not have an 'extend search' command. It's not needed. That's all I can think of now. I'll check the details later. cheers -Tim |