miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Data transfer with miniUPnP

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> NAT/UPnP
View previous topic :: View next topic  
Author Message
source



Joined: 23 Apr 2010
Posts: 4

PostPosted: Fri Apr 23, 2010 11:10 am    Post subject: Data transfer with miniUPnP Reply with quote

Hi, thanks for the miniUPnP lib Smile

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
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Fri Apr 23, 2010 5:40 pm    Post subject: Reply with quote

what profile of UPNP were you using for file transfer ??
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
source



Joined: 23 Apr 2010
Posts: 4

PostPosted: Sat Apr 24, 2010 12:58 pm    Post subject: Reply with quote

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. Smile

thanks
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Sun Apr 25, 2010 9:51 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
source



Joined: 23 Apr 2010
Posts: 4

PostPosted: Sun May 02, 2010 10:32 am    Post subject: Reply with quote

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
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Sun May 02, 2010 9:54 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
source



Joined: 23 Apr 2010
Posts: 4

PostPosted: Mon May 03, 2010 10:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Tue May 04, 2010 11:19 pm    Post subject: Reply with quote

you can surely adapt miniupnpd so it can run on mac.
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
kyliejakeman



Joined: 11 Dec 2010
Posts: 2

PostPosted: Sat Dec 11, 2010 3:50 pm    Post subject: Reply with quote

Thanks for the tips
Back to top
View user's profile Send private message
kyliejakeman



Joined: 11 Dec 2010
Posts: 2

PostPosted: Sat Dec 11, 2010 3:50 pm    Post subject: Reply with quote

Thanks for the tips Smile Smile it was very helpful Smile Smile i appreciate it Smile Smile
Back to top
View user's profile Send private message
made651ok
Guest





PostPosted: Thu Dec 08, 2011 2:41 am    Post subject: useful information thanks Reply with quote

thank you for the info.really helps a lot!!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> NAT/UPnP All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.