|
Posted: Aug 8, 2015 |
[ # 31 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
You do not run chatscript.exe from the top and inside the console type anything. You type
chatscript.exe port=1024
as a command line parameter. Instead the contents of the LocalServer.bat file to see this.
as for your typing in the message “eb0harold0hi0” how did you put in the null characters (which are not ascii 0 digit character)? Also I have no idea what invoke a web service does. Does it give back to you what was sent by the server and then close the port?
|
|
|
|
|
Posted: Aug 8, 2015 |
[ # 32 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
Hi Bruce, thanks for you reply
Sorry Bruce, but I don’t quite get it
Ok, I don’t type anything in the chtascript.exe console.
But what do you mean by “You type chatscript.exe port=1024 as a command line parameter”?
do you mean I should edit LocalServar.bat contents and add “chatscript.exe port=1024” line to it??? if this is so, it already has a similar line “ChatScript port=1024”, and what about the other line in the default LocalServerbat which is “userlog serverctrlz”. Im just confused. So you mean I run CS as server by running the new edited LocalServer.bat? with only this content…
cd ..
chatscript.exe port=1024
Sorry I didn’t get it.
thanks Advanced.
|
|
|
|
|
Posted: Aug 8, 2015 |
[ # 33 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
when running CS as a server, the console is output only, no input.
I THOUGHT you had said you had used the batch file to launch a server, which worked. But then you tried to directly type ChatScript.exe into a command prompt while in the root CS directory and I was saying you can’t launch a server that way without typing ChatScript port=1024. And yes, the batch file HAS the correct code to run CS as a server.
|
|
|
|
|
Posted: Aug 8, 2015 |
[ # 34 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
So you mean I got to open windows command prompt and go to ChatScript directory and then type “ChatScript port=1024” whitout quotes.
Ok it worked, sorry I misundertood windows command prompt with command, thanks.
Now I got the CS server running I will keep trying to connect to it. I guess is something wrong with the message Im sending to it, Im testing using fiddler.
Thanks bruce, I will notice any progress
|
|
|
|
|
Posted: Aug 9, 2015 |
[ # 35 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
Hi Bruce
I have been trying to use fiddler to set a reverse proxy in order to comunicate with chatscript server, but for some reason I can’t access the port 8888 or 80, I have read that I could change the machine NETBIOS port to 8888. But also I read in the “chatscript amazon server manual” something that you explained, like…
“Third, you need to add stuff to the machine. There are a couple of ways you might be using the
ChatScript server. First, by itself, with a port open to the web and talked to from your client program or webpage. Second, from a webpage on the same machine, opening no port to users for the ChatScript server. I chose the latter, so I had to have a webserver installed and a webpage to talk to ChatScript. A demo webpage named “index.php” exists in the WEBINTERFACE/SIMPLE directory of chatscript and uses PHP to do the work. (Thanks to Wade for the initial copy of this webpage.) Which means you need a way to communicate with it. I used WinSCP to talk to it along with Putty, and PuttyGen to generate a key from my keypair that WinSCP can use to authenticate itself.”
I just was wondering if there is any suggestion that you could have, regarding to how to set a connection to the CS server? Hope Im not abussing of your support, is just that Im now kinda running out of ideas.
Many Thanks. Bruce.
|
|
|
|
|
Posted: Aug 9, 2015 |
[ # 36 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
If you have a running CS server, and you have the SIMPLE index.php webpage I supply running on a local webserver, then if that webpage names localhost as the ip address and your default port 1024, it should be able to communicate with your server from a browser on your machine. Pretty much beyond that I am out of my sphere of knowledge. I’m not a web guy
|
|
|
|
|
Posted: Aug 15, 2015 |
[ # 37 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
Hi Bruce, many thanks for your support
I successfuly got it working using XAMPP with conjunction of a small variation of your SIMPLE index.php place inside xampp\htdocs. It worked fine.
I got one problem though. I would like to be able to manually set the User name everytime. (I mean to get multiple usernames talking with the same Bot continuously) but, by using the SIMPLE index.php script you provided the User name always is set the same as the IP address (always is set to 127_0_0_1), I noticed that cuz I used the “:who” command. I know in the SIMPLE index.php there is a comment that says “Be sure to put in your correct host, port, username, and bot name below !”, and I have tried adding a line $username = eb; before the before the $host = “127.0.0.1” line, but it keeps getting the IP as the username. If in $host I put my username instead of IP, the script doesn’t work anymore. Please could you tell me how I could set a different username eachtime using the SIMPLE index.php?? or should I use the BETTER index.php???
|
|
|
|
|
Posted: Aug 15, 2015 |
[ # 38 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
PD> I meant be able to set the username manually (like John, Michael, etc), a nickname, not its IP address.
Thanks again Bruce.
|
|
|
|
|
Posted: Aug 15, 2015 |
[ # 39 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
The script has this line:
$message = $userip.$null.$bot.$null.$msg.$null;
This is the 3-string message to be sent to CS.
$userip is the user name, it does not pay attention to $username (which is only for visual display in a log textbox to the user).
So set $userip
|
|
|
|
|
Posted: Aug 15, 2015 |
[ # 40 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
Thanks Bruce, it worked fine.
|
|
|
|
|
Posted: Sep 16, 2015 |
[ # 41 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
Hi bruce,
I improved the index.php script that I use with XAMPP in order to communicate with Chatscript, I can now also set the botName, UserName, and Message, also Im applying a quick URLencode to the Message. However, even using php (which it seems to be the faster way to connect to CS server) It takes 100ms to complete each connection. Please could you tell me if you’ve tested quicker resuts under windows? I know the manual says that under linux takes 10ms per connection, and windows has the slower server respond. Is my 100ms per connection to slow? How quick can I spect CS server connection to be under windows 8.1?? thanks Advanced.
|
|
|
|
|
Posted: Sep 16, 2015 |
[ # 42 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
Let us distinguish the time it takes a CS server to process a request and the time it takes a request to get to that server and get back.
Within the server, I say it takes under 10ms. And with multiple threads handling requests, the server can happily serve a number of customers at once.
In the internet, however, a network connect (TCP/IP) can take 250 ms. That value is outside of ChatScript’s control. So a bunch of worker threads are accepting incoming data and sending back replies on an entirely different timeframe from the CS server actually computing the reply.
When you are measuring time to complete a connection, are you doing it connecting to localhost (within the same machine) or actually between 2 machines. Localhost will be a lot faster.
|
|
|
|
|
Posted: Sep 17, 2015 |
[ # 43 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
Thanks Bruce,
Yes I tested it on localhost (within the same PC), I will tested it on 2 different machines now that I know it should take longer, I would need though to connect to a Chatscript server within a Local Area Network, should it be faster than an connection over interent? How much longer it could take (250ms?) So perhaps I should connecting only in localhost in order to keep the 100ms speed. What do you suggest bruce? Thanks Advanced.
|
|
|
|
|
Posted: Sep 17, 2015 |
[ # 44 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
A LAN should be faster than a WAN (internet).
“should connecting only in localhost”—Should depends entirely on your use case. Can your server always be on the same machine as the user? How much speed do you need?
I haven’t done any timing experiments to find minimal or average speeds across systems. THe most I have ever done is a load test to see how many messages I can pump over to a CS server before it starts getting timeout failures from overloading.
|
|
|
|
|
Posted: Sep 17, 2015 |
[ # 45 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
HI Bruce, thanks for your support
Yes user can always be at server PC (localhost), I really need CS to be the fastest as possible, so Im really considering running it not in server mode, I mean, placing CS working files inside each PC and got user accesing CS from each PC (please correct me if Im wrong) but, Im just a little worry about having different user logs in each PC. Im wondering… the only way to have all the users logs inside a single directory is running CS as server in one PC and got the other PCs communicate with it, right? Thanks Advanced. Bruce.
|
|
|
|