Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.
NicholasScott1337 edited this page Jul 18, 2015 · 2 revisions

Net:init( type )


Description
Call-Only
Initializes the network module
Parameters
Type
Tells the module whether to load as a server or client, string, "server" or "client"
Returns

Nil

Formats

Nil

Examples

Initializes as a client, and connects to a server

Net = include( "modules.net" )
function love.load()
   Net:init( "client" )
   Net:connect( "72.15.116.24", 10057 )
end

Initializes as a server, and listens on port 10057

Net = include( "modules.net" )
function love.load()
   Net:init( "server" )
   Net:connect( 10057 )
end