Sign in to follow this  
Followers 0
datkewlguy

tcp chat?

11 posts in this topic

my friends pretty good at this, he got it working with vb but had trouble doing it in autoit. IM trying to make a simple chat client for autoit using tcp functions in autoit but havent had much success. Does anyone know if this is even possible because so far i cant get it to connect to outside IPS.

Share this post


Link to post
Share on other sites



Look at the attached zip file.

This is an example of an echo server that accept multiple concurrent client connections and reply to each one the same string received.

Sorry but it is at a very initial level of developing.

To try it do:

1. Start the server program and push the Listen button;

2. Start the client program, connect than enter some text and push Send button.

3. Start another client program , connect than enter some text and push Send button.

4. Look at the server windows.

Server notes: If you push the Pause button, no new connection will be accepted but the current active connection still remain active.

I hope you'll enjoy.

Feedback/Comments will be appreciated.

Roy.

TCPEcho.zip

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

very useful, but now how do i make the server return the things it receives from clients back to both clients, like a chat room. This would mean that one client could chat with another one.

Edit: also, this will only work inside a home network, autoit for some reason will not allow me to change the IP to a dynamic one. Any ideas?

Edited by datkewlguy

Share this post


Link to post
Share on other sites

ever tryed the search function of this forum!!

this question has bin asked kinda 5 to 10 times, if it isn't more..


*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

i have serached, sorry but i didnt find the answers i was looking for...

Edit: yes i found things on the forums, but most responses have been that this is impossible, i was asking this in hope that somebody had found a way.

Edited by datkewlguy

Share this post


Link to post
Share on other sites

man u can't search...

http://www.autoitscript.com/forum/index.ph...topic=12148&hl=

for some tcp ip help..

http://www.autoitscript.com/forum/index.ph...topic=12459&hl=

and if u search for au3xtra.dll ull find more...


*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

okay but listen, i found those already. They dont answer my questions, im not trying to do it within the network, this would work across countries.

Edit: @Roy, your program does not appear to work outside of a single computer, im having trouble getting 2 comps on my network to send data back and forth.

Edited by datkewlguy

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

hey im datkewlguys friend he was talkin about, and here is the real dilemma here...

first i must say that i am using the latest beta of autoit so i dont need au3xtra.dll.

anyway, in the helpfile examples theres a pre-built tcp server and client app, for just two way communication. it works when the server is set to listen at 127.0.0.1 and the client is set to connect to 127.0.0.1, however when i change it to my ip address, the server freezes as soon as the client connects... i cant understand why it does this could someone please help

edit:

is it possible to somehow implement Winsock controls (located in MSWINSCK.OCX, used in vb6) into autoit? this would solve all of our problems

Edited by Nakuribon

i own this sig... php rulezlinks:My PSP Web Portal

Share this post


Link to post
Share on other sites

are you trying to listen to your server (LAN) ip or internet (WAN) ip. ? do you have a gateway ?

Share this post


Link to post
Share on other sites

okay but listen, i found those already. They dont answer my questions, im not trying to do it within the network, this would work across countries.

Edit: @Roy, your program does not appear to work outside of a single computer, im having trouble getting 2 comps on my network to send data back and forth.

<{POST_SNAPBACK}>

Try this:

- On the PC that runs the server program: put the Ip address of that machine;

- On clients PC: put the Ip address of the Server Machine

In addition, if you have any sort of firewall, be sure that the port you choosen are opened.

Roy :(

Share this post


Link to post
Share on other sites

Try this:

- On the PC that runs the server program: put the Ip address of that machine;

- On clients PC: put the Ip address of the Server Machine

In addition, if you have any sort of firewall, be sure that the port you choosen are opened.

Roy  :(

<{POST_SNAPBACK}>

That won't work, we are trying to connect to a WAN Ip...

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