Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

connect

NicholasScott1337 edited this page Jul 18, 2015 · 2 revisions

Net:connect( ip, port )


Description
Call-Only
Connects to a server if client, if server it listens on a port
Parameters
IP
IP of the server you're connecting to, if running as server this should be Nil
PORT
Port of the server you're connecting to, if you're running as server this is the port you want to listen on
Returns

Nil

Formats

Nil

Examples

Starts listening on port 10075 after starting

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

Connects to server after starting

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