Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D Desastres
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Desastres
  • Desastres
  • Wiki
  • Api
  • firstconnection

firstconnection · Changes

Page history
joao.severo created page: api/firstconnection authored Sep 19, 2018 by João Vitor Bernardi Severo's avatar João Vitor Bernardi Severo
Hide whitespace changes
Inline Side-by-side
api/firstconnection.md 0 → 100644
View page @ f75bdaa9
## 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.
```JSON
{
"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.
```JSON
{
"token": "eyauhsuahashuas120912ajsja.umclmasjuemduh01920.auhsukmdclmahas19219"
}
```
With all the three steps realized, the agent will be participating the simulation.
Clone repository
  • API
  • QuickStart
  • agents
  • agents
    • actions
    • agent
  • api
    • firstconnection
    • firstmessage
    • how it works
    • stepsmessages
  • Home
  • notes
  • requirements
  • setting enviroment
  • simulation
  • simulation
    • corearchitecture
View All Pages