View previous topic :: View next topic |
Author |
Message |
source
Joined: 23 Apr 2010 Posts: 4
|
Posted: Fri Apr 23, 2010 11:10 am Post subject: Data transfer with miniUPnP |
|
|
Hi, thanks for the miniUPnP lib
Ive been using libupnp to send some data between 2 machines, but miniUPnP looks so lighweight and easy to port.
Can I use miniUPnP to transfer data (chars/bytes/file) between a custom client and a custom daemon? Should I use simpleUPnPcommand? Whats the most simple way to send some data?
thanks |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1587
|
Posted: Fri Apr 23, 2010 5:40 pm Post subject: |
|
|
what profile of UPNP were you using for file transfer ?? _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
 |
source
Joined: 23 Apr 2010 Posts: 4
|
Posted: Sat Apr 24, 2010 12:58 pm Post subject: |
|
|
Hi, thanks for your reply.
I installed the libupnp dev package for linux and then modified the tv ctrl/device sample to send some text bewteen to linux machines.
My goal is to write two simple classes that send/receive data between 2 machines on the local network and Id be happy to submit the files if I could get it to work with miniUPnp. Its like a very simple multi-player setup.
Something like this:
--- server ---
CSever s;
s.register("my-game-server-1");
--- client ---
CCLient c;
if (s = c.findServer("my-game-server-1"))
{
s->sendData("Hello world", 11);
}
So the server class must be able to regsiter itself, the client must be able to search for server and both classes must have send/receive data. Thats it.
thanks |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1587
|
Posted: Sun Apr 25, 2010 9:51 am Post subject: |
|
|
Well You'll need to add your command to send text in miniupnpc/upnpcommand.c
and in miniupnpd/upnpsoap.c _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
 |
source
Joined: 23 Apr 2010 Posts: 4
|
Posted: Sun May 02, 2010 10:32 am Post subject: |
|
|
Thanks,
I have now built the both the miniupnpc and miniupnpd on my macbook.
How can I run the miniupnd so that I can discover it with upnpDiscover()? Ive tried sudo ./miniupnp -d but the client only finds my linksys wireless router. It seems the miniupnpd exits without any message.
I have the miniupnpd.conf but not the miniupnpd.pid, not sure where to make/get it. |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1587
|
Posted: Sun May 02, 2010 9:54 pm Post subject: |
|
|
source wrote: | Thanks,
I have now built the both the miniupnpc and miniupnpd on my macbook.
How can I run the miniupnd so that I can discover it with upnpDiscover()? Ive tried sudo ./miniupnp -d but the client only finds my linksys wireless router. It seems the miniupnpd exits without any message.
I have the miniupnpd.conf but not the miniupnpd.pid, not sure where to make/get it. |
well I'm not sure miniupnpd works on mac. miniupnpd -d should output something ! _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
 |
source
Joined: 23 Apr 2010 Posts: 4
|
Posted: Mon May 03, 2010 10:45 pm Post subject: |
|
|
Ok, but can I use the miniupnp library to create a device that runs on mac? if so, what steps to setup up a "Hello World" device?
Sorry for all the questions if this is not what the miniupnp is ment for. |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1587
|
Posted: Tue May 04, 2010 11:19 pm Post subject: |
|
|
you can surely adapt miniupnpd so it can run on mac. _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
 |
kyliejakeman
Joined: 11 Dec 2010 Posts: 2
|
Posted: Sat Dec 11, 2010 3:50 pm Post subject: |
|
|
Thanks for the tips |
|
Back to top |
|
 |
kyliejakeman
Joined: 11 Dec 2010 Posts: 2
|
Posted: Sat Dec 11, 2010 3:50 pm Post subject: |
|
|
Thanks for the tips it was very helpful i appreciate it  |
|
Back to top |
|
 |
made651ok Guest
|
Posted: Thu Dec 08, 2011 2:41 am Post subject: useful information thanks |
|
|
thank you for the info.really helps a lot!! |
|
Back to top |
|
 |
|