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

Last edited by Gabriel Henrique Paul Nov 16, 2018
Page history

firstconnection

|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.

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