Sign in to follow this  
Followers 0
spyrorocks

P2P-Style Chat

11 posts in this topic

It has been too long since I have posted a project on here. I will be posting more frequently now.

Anyways, without further to do, here is P2PChat v1.0

Download: P2PChat.zip

P2PChat is a serverless chat app to be used in your local LAN. Each running P2PChat app will send out a beacon UDP Packet to every PC within your subnet to try to find other clients that are in your same channel to connect to.

Each client is completely independent from one another, allowing for a strong network.

Please note, this has been tested with AutoIt v3.2.10.0

Features:

-Smilies :)

-Auto-Connection to other clients upon start up

-Different Channels for chatting in

-List of users online

Bugs:

-Client Crashes when you disconnect from a channel, connect to a new channel, the connect back to the old channel.

Comments appreciated.

_Spyrorocks

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

It has been too long since I have posted a project on here. I will be posting more frequently now.

Anyways, without further to do, here is P2PChat v1.0

Download: P2PChat.zip

P2PChat is a serverless chat app to be used in your local LAN. Each running P2PChat app will send out a beacon UDP Packet to every PC within your subnet to try to find other clients that are in your same channel to connect to.

Each client is completely independent from one another, allowing for a strong network.

Please note, this has been tested with AutoIt v3.2.10.0

Features:

-Smilies :)

-Auto-Connection to other clients upon start up

-Different Channels for chatting in

-List of users online

Bugs:

-Client Crashes when you disconnect from a channel, connect to a new channel, the connect back to the old channel.

Comments appreciated.

_Spyrorocks

It wouldn't run on 3.2.10.0 so I changed it to use guilistbox.au3 so it runs on beta 3.2.9.14 without errors.

Apart from that it works very well.

If you use Scite then I think your script wold look better if you 'tidied' it.

Would be good IMO if chat scripts had a panel for someone to send a picture. Maybe put the edit for connected users on a tab control and have a page for attachments.

EDIT: I hadn't noticed that you've used IECreateEmbedded, so you could add pictures.

The smilies work well.

Good work, keep going.

Edited by martin

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Where you use TCP? I've seen only UDP.

You should improve teh chat. see the mine.

mmmm, dude, I am not an expert on network programming but you missed something, the only way (I think, or at least the only reliable one) to create a serverless chat program (or any other kind of network traffic without any centraliced server, like quake servers for example) have to be programmed using ONLY UDP protocol + multicasting. So TCP is the best protocol for client-server applications but when talking about serverless applications you have to forget TCP and center only on UDP. (Someone with more knowledge than me correct me if I am wrong).

Share this post


Link to post
Share on other sites

Sorry!!

I've seen after.

He uses both, TCP and UDP.

global $tcpport = 1628
global $tcpsock = tcplisten($ip, $tcpport)      
;-----
;more code
;-----
case left($in[0], "REQ USR")
        tcpsend($in[1], "USR "&_stringtohex($username)&@crlf)
;-----
;more code
;-----
func check_newusers()
local $user = tcpaccept($tcpsock)
if $user > -1 then
;-----
;more code
;-----

A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza è il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center]

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Cool I like how you used HTML for the smilieys. I hope you don't mind if I snag that bit of your code for a TCP chat I'm making!

(Credit and a link to yours will be included :) )

Hallman

Edited by Hallman

Share this post


Link to post
Share on other sites

Sorry!!

I've seen after.

He uses both, TCP and UDP.

Oh, I see. Although I was only traying to explain why the need of UDP for a serverless client. I am not sure but I think multicasting is only possible using udp protocol.

Share this post


Link to post
Share on other sites

Cool I like how you used HTML for the smilieys. I hope you don't mind if I snag that bit of your code for a TCP chat I'm making!

(Credit and a link to yours will be included :) )

Hallman

I love using network functions in autoit scripts. as long as you give me credit where necessary, its all good.

This is just my method of a serverless lan chat app.

Share this post


Link to post
Share on other sites

I love using network functions in autoit scripts. as long as you give me credit where necessary, its all good.

This is just my method of a serverless lan chat app.

Just had to comment, this thing is pretty cool, it's really helping me out with the lan P2P concept! Thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0