PDA

View Full Version : Anyone has a p2p/tcp communication DLL ?


CrazyFrog
04-28-2007, 01:29 AM
Hy . I was wondering if anyone has a a p2p/tcp communication DLL , to communicate 2 apps on two different computers over the internet.This would be great for chat apps.I tryed to use LuaSocket , but it seems to be too complicated for me , and the ApplicationMessageCenter dll is not working well.
If anyone knows another plugin or way to do this , please help me


Thanks a Lot !!;) :D

RizlaUK
04-28-2007, 07:44 AM
LuaCOM Plugin (http://www.icynorth.com/luacom/index.html)

Dermot
04-28-2007, 11:51 AM
LuaSocket is the way to go. Have you tried this example from Worm http://www.indigorose.com/forums/showthread.php?t=13246&highlight=simple+chat

wasim21k
04-30-2007, 05:59 AM
but is there any other example where we can communicate two computers over internet and transfer data (secure connection) would it be possible to do so?
like enter destination ip and make connection between two computers i know how to do in windows very easy but would be lot better if we can do in AMS.

TristanD
05-07-2007, 09:51 AM
im playing with luasocket to get this kind of connection but so far no luck..

wasim21k
05-09-2007, 05:37 AM
well any one els with some brilliant idea? :huh

Tek
05-09-2007, 03:32 PM
If you used LuaSocket together with some crypto for the data you are sending, you can make it somewhat safe. As long as the client/server each know the private key to decrypt the message.

wasim21k
05-10-2007, 03:35 AM
i think first some one have to come with some solutions then later we can discuss how to secure connection

and i doubt that LuaSocket can do the job as its say on web site:

Among the support modules, the most commonly used implement the SMTP (sending e-mails), HTTP (WWW access) and FTP (uploading and downloading files) client protocols. These provide a very natural and generic interface to the functionality defined by each protocol. In addition, you will find that the MIME (common encodings), URL (anything you could possible want to do with one) and LTN12 (filters, sinks, sources and pumps) modules can be very handy.

CrazyFrog
05-28-2007, 01:57 AM
Hello , in one week I will have again Internet Connection available at my home and I will spend more time on this forum...
For this data transfer between 2 apps over the Internet , maybe will work ApplicationMessageCenter.dll plugin , but I can't get it work..anyone who knows how to "turn on" this plugin is welcomed here !
And....again ,thanks for helping me:yes :cool

sside
05-28-2007, 12:11 PM
Hello , in one week I will have again Internet Connection available at my home and I will spend more time on this forum...
For this data transfer between 2 apps over the Internet , maybe will work ApplicationMessageCenter.dll plugin , but I can't get it work..anyone who knows how to "turn on" this plugin is welcomed here !
And....again ,thanks for helping me:yes :cool

A quick guide on how to "turn on" ApplicationMessageCenter.dll.

I assume you have downloaded ApplicationMessageCenter.v.1.0.0.0.rar. The contents are:
Client1.apz
Client2.apz
Server.apz

For simplicity’s sake let's suppose that the clients and the server are located in the same computer.
Note:
Before you start Client2 make a little correction button ReceiveMessage OnClick event line1:

it is:

message = ApplicationMessageCenter.Client.ReceiveMessage("Client1");

should be:

message = ApplicationMessageCenter.Client.ReceiveMessage("Client2");

or else Client2 will be receiving the messages of Client1.


Start server.
Click HttpStart (TcpStart and IpcStart will do as well).

Start Client1.
Click Connect.
Click AddEntry.

Start Client2.
Click Connect.
Click AddEntry.

Click SendMessage to send message.
Click ReceiveMessage to receive message.

If you place the code of ReceiveMessage button in a timer then you don't need to click the ReceiveMessage button anymore.


If you want to place the clients and the server in different computers then you must make a 2 changes at the clients:
1-Channel (protocol). The channel must be a channel server is listening at.
2-Ip address. Ip address must be the ip address of the computer where server is located.

Click the proper button at Server. HttpStart and TcpStart is for local computer and network/internet. IpcStart only for local computer
Change the first line of code of Connect button at both clients. The first argument should be the channel server is listening at. If you clicked HttpStart at server then the channel should be Channels.Http but if you clicked TcpStart at server then the channel should be Channels.Tcp. The second argument should be the ip address of the computer where server is located.

So, if the server is listening at Channels.Http channel and the ip address of the computer where server is located is 100.45.122.35 then change it so:

it is:

ApplicationMessageCenter.Client.Connect(Channels.H ttp, "localhost");


should be:

ApplicationMessageCenter.Client.Connect(Channels.H ttp, "100.45.122.35");

This is the guidelines when you send messages. To send a file convert first the file as a base64 string then send it likewise you used to send a message.

Few other things to be aware of:
Place the dll always where the exe is, not at the docs folder (or any other folder) like you're used to.

To connect at server, the client must use a channel (protocol) that server is listening at.

When server is behind a router follow the same guidelines you follow when you use p2p applications. With other words: you must make changes to the router (port forwarding, 32469 for http, 32470 for tcp (both tcp protocol at router)).

.Net 2.0 required.


Few other notes:
My site from where you downloaded the ams projects, dll's is shutdown. I have no plans to bring it online (at least for the moment). Forgive me if i have disapointed you. Feel free to share the dll's i have created with each other.


With Kind Regards
sside

CrazyFrog
05-31-2007, 02:09 AM
Ok sside , thanks a lot , i will try this at home ( I am at my school for the moment ) , and you can send me please the plugins you have by email : liviu_oana2007a@yahoo.com , and I will put the plugins and dll's on my webhost domain ( www.weed.srv.ro ) until your site is online again