Skip to content
This repository has been archived by the owner on Nov 28, 2018. It is now read-only.

Network

Mattias Nilsen edited this page Dec 21, 2015 · 3 revisions

Overview

All networking is handled by KryoNet.

The communication between programs are primarily achieved with messages and messages accompanied by some data.

List of available messages

  • REQUEST_SOURCES - Notifies the server that a client wants to download the jar file containing the given code.
  • TRANSFER_SOURCES - Contains an accompanying object that is some form of java code.
  • NEW_TEAMNAME - Sent by the client to the server when a new connection is made, contains a string which is the team name requested by the client.
    • BAD_TEAMNAME - Is sent from the server to the client in response to NEW_TEAMNAMEe
    • GOOD_TEAMNAME - Is sent from thet server to the client in response to NEW_TEAMNAME
  • CHUNKED_TRANSFER - Notifies the receiver that a chunked transfer is to be initiated, contains the total size of the data that is going to be sent.
    • CHUNK - Contains a chunk of the data in a chunked transfer, this packet will be repeatedly sent until the size sent with the CHUNKED_TRANSFER packet has been sent. This packet must be preceeded by a CHUNKED_TRANSFER packet.
    • TRANSFER_ERROR - Sent by the server to the client to indicate that something has gone wrong with a chunked transfer so the client can abort.
Clone this wiki locally