mathiasuk / ac-pserver Goto Github PK
View Code? Open in Web Editor NEWAssetto Corsa UDP example server, in python
Assetto Corsa UDP example server, in python
Is there anything required to get acServer to trust pserver.py?
When I send data to acServer using:
self._broadcast_chat('hello everyone')
No broadcast is sent. However, the acServer log shows this message:
UDP_PLUGIN: Ignored suspicious message from 127.0.0.1:54531
Very intresting project but i just wanted to know about the message type as i thought there was only one type as it shows in this doc? where did you get all the types i can see in your code??
https://docs.google.com/document/d/1KfkZiIluXZ6mMhLWfDX1qAGbvhGRC3ZUzjVIt5FQpp4/pub
Hello, I've got a question before using this.
proto.py defines codes.
However I think it is better if I know the reference(s) of the protocols to expand this project.
Could you give me links to reference page or document of the protocol?
Hello,
I've been trying to get this codebase connected to acServer.exe for two-way communication. Probably I am not specifying ports correctly.
A question about server_cfg.ini, as referenced in the README:
'''Make sure that UDP_IP, UDP_PORT, and UDP_SEND_PORT match the values of UDP_PLUGIN_ADDRESS and UDP_PLUGIN_LOCAL_PORT of server_cfg.ini respectively.'''
It appears that the three values in the python file (UDP_IP, UDP_PORT, and UDP_SEND_PORT) match up with only two values in server_cfg.ini (UDP_PLUGIN_ADDRESS, UDP_PLUGIN_LOCAL_PORT). How exactly are these supposed to align?
So far I have tried using these values in server_cfg.ini:
UDP_PORT=9600
TCP_PORT=9600
HTTP_PORT=8081
UDP_PLUGIN_LOCAL_PORT=11000
UDP_PLUGIN_ADDRESS=127.0.0.1:10000
And in pserver.py I have tried it both of these ways:
# Version 1
UDP_IP = "127.0.0.1"
UDP_PORT = 10000
UDP_SEND_PORT = 11000
# Version 2
UDP_IP = "127.0.0.1"
UDP_PORT = 11000
UDP_SEND_PORT = 10000
But I get no data from pserver.py.
Also when I run netstat to see what ports acServer is listening on, the only (UDP) ports listed are 9600 and (sometimes) 27036.
$ netstat -a -v -b | grep -B 1 acServer
TCP 0.0.0.0:8081 EC2AMAZ-FGB6RC1:0 LISTENING
[acServer.exe]
TCP 0.0.0.0:9600 EC2AMAZ-FGB6RC1:0 LISTENING
[acServer.exe]
--
TCP 172.31.20.64:8081 46:50127 ESTABLISHED
[acServer.exe]
TCP 172.31.20.64:8081 83-81-49-25:57907 ESTABLISHED
[acServer.exe]
TCP 172.31.20.64:8081 host212-250-dynamic:61789 ESTABLISHED
[acServer.exe]
TCP 172.31.20.64:8081 89-95-214-168:59015 ESTABLISHED
[acServer.exe]
TCP 172.31.20.64:8081 159-255-236-152:52894 ESTABLISHED
[acServer.exe]
TCP 172.31.20.64:8081 host-176-41-54-54:63802 ESTABLISHED
[acServer.exe]
TCP 172.31.20.64:8081 ZG095207:60665 ESTABLISHED
[acServer.exe]
--
TCP 172.31.20.64:50397 93-57-10-21:http ESTABLISHED
[acServer.exe]
--
TCP [::]:8081 EC2AMAZ-FGB6RC1:0 LISTENING
[acServer.exe]
TCP [::]:9600 EC2AMAZ-FGB6RC1:0 LISTENING
[acServer.exe]
--
UDP 0.0.0.0:9600 *:*
[acServer.exe]
--
UDP [::]:9600 *:*
[acServer.exe]
I have also used LiveTcpUdpWatch to record UDP transmissions, and it only shows UDP transmissions coming from port 9600, and they all go to other machings (none to 127.0.0.1) and none of them are sent to ports 10000 or 11000.
My firewall is disabled, and I am running pserver.py on the same machine as acServer.exe.
Is there anything else required in the server_cfg.ini to enable this UDP connectivity? For example, is some [PLUGIN_0] section required?
Does acServer.exe automatically start sending data on UDP to the appropriate location, or does it only start sending data on UDP after it receives a packet (a CSP_REALTIMEPOS_INTERVAL packet, for instance)? Or does at least one car have to be loaded into the session?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.