AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Client & Server Script for TCP/IP Network Communication
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
flatron85



Joined: 13 Oct 2009
Posts: 6

PostPosted: Mon Dec 21, 2009 4:16 pm    Post subject: Reply with quote

bump

because it's really awesome !
thanks to everybody who has contributed so far and also to those in the future.

Very Happy
Back to top
View user's profile Send private message
BF2 Player



Joined: 27 Mar 2009
Posts: 71

PostPosted: Mon Dec 28, 2009 10:01 pm    Post subject: Reply with quote

Ok, This partially works for me.
Im not getting the right result for the script im trying to create because when I send a packet,
it adds about 30 Null Characters ( 00 ) after the packet info I am trying to send.
This is making it so the server I am trying to connect to is not reading it right and it isnt
recognizing the command im sending because it is too long.
Could this be a problem with winstock or the TCP Send script?
Im connecting to a Rcon server for BF2.
Back to top
View user's profile Send private message
tomoe_uehara



Joined: 05 Sep 2009
Posts: 1591
Location: Somewhere near you

PostPosted: Tue Dec 29, 2009 12:38 am    Post subject: Reply with quote

Wow, I know I'll find this kind of 'server & client' thread at the forum. I read from the beginning until the end, there's a lot of code changes and add-on, but I don't know which one is the final working script..
Could anyone post the latest server & client's code?

_________________

The quick onyx goblin jumps over the lazy dwarf
Back to top
View user's profile Send private message
ProblUser
Guest





PostPosted: Sun Feb 21, 2010 5:21 pm    Post subject: Reply with quote

I have problem:
computer1: run Server
computer2: run Client, enter IP aaaaaaaaand -> "connect() indicated winsock error 10061?" Sad
Back to top
Vegas
Guest





PostPosted: Wed Apr 07, 2010 3:13 am    Post subject: Reply with quote

Hi i run a Server with a desktop pc and a laptop

i want to run 2 applications on the laptop that when i press the binded key on thd desktop the laptop will select both programs then for example run the key "f1" on both applications.

is this easy to add to this script?
Back to top
Guest






PostPosted: Fri May 07, 2010 3:03 am    Post subject: Reply with quote

ProblUser wrote:
I have problem:
computer1: run Server
computer2: run Client, enter IP aaaaaaaaand -> "connect() indicated winsock error 10061?" Sad


I encountered a similar problem. It means, that the connection was refused. This happens, if e.g. the server is not running or is running under a different IP-adress or listening to a different port. So perhaps you might want to check, whether the client is talking to the correct ip-adress and the correct port.

in my case, this also happened because of an airport express (a WiFi-Router), the server was running behind. I solved the problem using two alternatives: taking the airport express out of the connection OR ordering the airport express to reroute the public port XXXX (number known to the client) to the internal port YYYY (number known to the server). In my case, both numbers were the same. The internal ip-adress connecting to the rerouted ports was the internal ip-adress of the server.
Back to top
ibennett
Guest





PostPosted: Wed May 19, 2010 5:08 pm    Post subject: can you make this simple Reply with quote

Hi,

I copied the two scripts client and server, modified the network adress and it is working perfectly, this is exactly what I was looking for since weeks, FANTASTIC. Thanks so much

But I have been passing hours trying to understand the script, going from the script to AutoHotKey help to understand each line, but it is all to complicated for me simple user of AHK.
I have made some of my own script, I have even been able to send keystrokes from one computee to an other with the use of synergy (it allow you to basically share mouse and computer over a network)

Ok I will get to my point: can someone for the porpuse of understanding the script make it as simple as possible , just the needed and basic things to send a simple order over to the client computer, a keystroke or a MsgBox or anything easy. I was thingking of:
Push B on the server -> Client will show a MsgBox with B For example with no error reports and other things just the basic so we can understand were exactly the basic instruction are in the script.

This would be so helpfull,

Thanks,
Back to top
Cornelius
Guest





PostPosted: Sat Nov 27, 2010 5:23 pm    Post subject: Reply with quote

I want to make a server with java and the client with AHK. For testing the server sends everything he gets to all connected clients. But in AHK in only works for the first send, all other sends won't be showed in the AHK Window.
And on the Server side there are additional keys after the first send

Quote:

1. Send [SERVER] f

[SERVER] (e)


The Problem is, when i copy [SERVER] e, as it was print out in console it only copies [SERVER] , so i have to copy e alone, I think this is also the receive problem, but how can i solve it?
Back to top
haering
Guest





PostPosted: Thu Dec 02, 2010 8:45 pm    Post subject: Reply with quote

How can I make it Autoreconnect after Disconnect?
Back to top
JoeSchmoe



Joined: 17 Feb 2008
Posts: 303

PostPosted: Fri Dec 03, 2010 5:20 am    Post subject: Reply with quote

Hi all,

People interested in this script may want to check out AHKSock:
http://www.autohotkey.com/forum/viewtopic.php?t=58183

It is a really very carefully written library for TCP/IP (socket) based communication. It requires a background in sockets (available online), but I think of it as superseding this script (just my opinion, and I confess not knowing this code very well any more).

If you're interested in chat programs, the author of AHKSock included 4 very carefully documented examples of how to use the library, and the third example is for a chat program.

Best of luck...
Back to top
View user's profile Send private message
will42100
Guest





PostPosted: Fri Jan 13, 2012 1:01 am    Post subject: Chatroom Ideas Reply with quote

To make this in to a chatroom, here's some tips (I'm actually working on it, I'm just putting this here.)

    Add all these multiple user codes.
    To make sure that you don't **** something up and look like some idiot,
    Code:
    URLDownloadtoFile http://cfaj.freeshell.org/ipaddr.cgi
    and FileRead it to the IP address variable.
    First prompt for port.
    Add a bookmarks list as the first GUI that shows up so you can have a list of chatroom servers, and then add as a secondary GUI accessed through a button a IP address and port prompter.
    Replace the tooltip with a read-only edit and under it a non-readonly edit with a button that sends it to the server.
    Have the server redirect client chattings to everyone.
    Add a username prompt and a default username.
    Add a settings file to save the bookmarks, the default username, etc.
    Add the same thing for the server file, just with admin commands.
    Add a signature symbol list so some person doesn't abuse the commands.
    Etc.

Wink What do you think? Very Happy
Back to top
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9
Page 9 of 9

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group