Hi, I am interested in trying to access AMIP from *nix. It appears that AMIP server creates a TCP socket connection that should be able to be accessed remotely. Can you give some indication on how this could be done?

I've tried with socket and telnet, but both indicate that the AMIP hosting machine refuses the connection.

Thank you for looking into this for me. I could help you with anything you'd like if you want help using asio on windows, although I'm not much of a programmer.

This is kind of a fun little project for me to do, so the program I write could be as simple as an executable which pulls the song information from AMIP, or an irssi plugin which implements greater functionality. Myself, and a certain percentage of the populace, use Windows as a desktop, but PuTTY+irssi for chat. This would be great for us, as AMIP appears to be quite powerful. Other solutions I've tried were having another Winamp plugin FTP a file with song information to my server, but this is very ugly in comparison with the solution I have in mind.

I guess you are the person who responded to my post on codeproject :-)

I will try to write a simple server program on windows using RCF/ASIO, and see if this will allow cross-platform TCP/socket connection if that would help you diagnose...

so i'm a little stuck trying to implement any kind of ClientService. I know that AMIP on my windows machine is properly transmitting commands and events, because when i run a socket tool, i get output:

i realize you do things a little differently in your code, with templating, threads, queues and stuff. that is a little advanced for me right now, so i'm trying to build my way up using the examples on the RCF website.

Ignore the last email, it was a problem of needing to have the libs and source built with BOOST_ASIO. I got that solved, and now I have a 95% working server program. Using the code I listed above, I now get the following when I run the following test program:

However, when I try change a song in AMIP, the server program does not respond. This confuses me, because before, when I had a server program built without ASIO, the server program would segfault when I changed a song in AMIP. Now it seems as if the server program does not even get a connection from AMIP.

It is clear to me that, in the case where the server program runs without ASIO, it binds to *:60334, whereas when I compile with ASIO, it binds to 127.0.0.1:60334, regardless of what I set "host" to in RCF::TcpEndpoint. I have verified this by running `sockstat -l4` in either case. I realize that this appears to be an RCF issue, but I thought I'd post it here for the benefit of anyone else trying this stuff out, or in case you'd encountered anything like this.

Implemented ClientService mechanism as an irssi plugin. BOOST_THREADS don't seem to play nicely in irssi, I get failure to allocate thread resources. So I'm forced to use POSIX threads (pthreads), which, while probably not as safe, is definitely doable since I'm only using a single thread for the service. I basically copied your GenericServer word for word, replacing the windows thread stuff with unix thread stuff. I think I basically have it down, although I don't really understand a few things.

(1) Mutexes. No idea what these are, I'll have to read up.(2) The mechanism through which a C++ member function is passed as a function pointer argument to a C function.

Regarding (2), I was pulling my hair out trying to figure out how to do this, when I decided to try it like you did. I figured your method wouldn't work on *nix, thinking it was MS specific, but it worked great. You are a genius sir .

Now have most of the major functionality of the AMIP socket server available to my Irssi plugin.+ ping, eval, exec, add/remove_event_listener+ receive output from AMIP through service

I'm getting ready to release a "demo" version to sourceforge.net.I was planning on releasing as GPL, but since I'm using two pieces of code from the SDK (MyService.hpp and ClientService.hpp), I thought I'd ask your opinion on that first.