|Home|Quick Start|Sprints|Requirements|Architecture|Server Config|API|GIT|Simulation|Agents|
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
Connecting with the Server
To start the comunication with de simulation, the agents must do a request to the server asking to connect.
It's considered that the agents already know the IP and the port that will be used by the server.
After the request be sent to the server, it must send back to the agent a JSON formated response containing all the information of the agent that is selected randomly by the server like the exemple below.
{
"token": "eyauhsuahashuas120912ajsja.umclmasjuemduh01920.auhsukmdclmahas19219",
"agentClass": {}
}
}
If the agent received the response from the server, it must send back his token, wich was passed in the response from the server, confirming the conection with the server. The response must also be in a JSON format like in the exemple below.
{
"token": "eyauhsuahashuas120912ajsja.umclmasjuemduh01920.auhsukmdclmahas19219"
}
With all the three steps realized, the agent will be participating the simulation.