Networking

Class providing networking related tasks.

Functions

Networking.ClientWriteLobby(client)

Writes again the lobby data of a client, useful for syncing submarine lists or other lobby options.

Parameters

  • client

Networking.CreateEntityEvent(entity, extraData)

Creates an entity event.

Parameters

  • entity

  • extraData

Networking.HttpGet(url, callback, textData, contentType)

Send a GET HTTP Request, callback is called with the result string message, status code and headers. only url anda callback are optional.

Parameters

  • url

  • callback

  • textData

  • contentType

Networking.HttpPost(url, callback, textData, contentType)

Send a POST HTTP Request, callback is called with the result string message, status code and headers.

Parameters

  • url

  • callback

  • textData

  • contentType

Networking.HttpRequest(url, callback, data, method, contentType, headers, savePath)

Sends a HTTP Request, callback is called with the result string message, status code and headers. If savePath is specified, the result will be saved as binary format in the specified path. only url and callback are optional.

Parameters

  • url

  • callback

  • data

  • method

  • contentType

  • headers

  • savePath

Networking.Receive(netMessageName, callback)

Adds a function to listen for lua net messages

Parameters

  • netMessageName

  • callback

Networking.Send(netMessage, connection, deliveryMethod)

Sends a net message to a connection, if the connection is null, then it sends the message to all connections

Parameters

  • netMessage

  • connection

  • deliveryMethod

Networking.Send(netMessage, deliveryMethod)

Sends a net message to the server.

Parameters

  • netMessage

  • deliveryMethod

Networking.Start(netMessageName)

Creates a new net message, returns an IWriteMessage

Parameters

  • netMessageName

Returns

  • IWriteMessage

    netMessage

Networking.UpdateClientPermissions(client)

Updates the client permissions, call this after you i've changed the permissions of a client, so they are notified about it.

Parameters

  • client

Fields

Networking.FileSenderMaxPacketsPerUpdate

Incomplete

Documentation for this section is incomplete and needs expanding.

Networking.LastClientListUpdateID

Incomplete

Documentation for this section is incomplete and needs expanding.