bump
because it's really awesome !
thanks to everybody who has contributed so far and also to those in the future.
Client & Server Script for TCP/IP Network Communication
Started by
Zed Gecko
, Nov 02 2006 03:00 PM
130 replies to this topic
#121
-
Posted 21 December 2009 - 04:16 PM
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.
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.
#122
-
Posted 28 December 2009 - 10:01 PM
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?
Could anyone post the latest server & client's code?
#123
-
Posted 29 December 2009 - 12:38 AM
I have problem:
computer1: run Server
computer2: run Client, enter IP aaaaaaaaand -> "connect() indicated winsock error 10061?"
computer1: run Server
computer2: run Client, enter IP aaaaaaaaand -> "connect() indicated winsock error 10061?"
#124
-
Posted 21 February 2010 - 05:21 PM
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?
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?
#125
-
Posted 07 April 2010 - 03:13 AM
I have problem:
computer1: run Server
computer2: run Client, enter IP aaaaaaaaand -> "connect() indicated winsock error 10061?"
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.
#126
-
Posted 07 May 2010 - 03:03 AM
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,
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,
#127
-
Posted 19 May 2010 - 05:08 PM
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
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?
And on the Server side there are additional keys after the first send
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?
#128
-
Posted 27 November 2010 - 05:23 PM
How can I make it Autoreconnect after Disconnect?
#129
-
Posted 02 December 2010 - 08:45 PM
Hi all,
People interested in this script may want to check out AHKSock:
http://www.autohotke...pic.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...
People interested in this script may want to check out AHKSock:
http://www.autohotke...pic.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...
#130
-
Posted 03 December 2010 - 05:20 AM
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,
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?
Add all these multiple user codes.
To make sure that you don't **** something up and look like some idiot,
URLDownloadtoFile http://cfaj.freeshell.org/ipaddr.cgiand 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?
#131
-
Posted 13 January 2012 - 01:01 AM