Click or drag to resize

LiteNetManagerConnect(String, Int32, NetDataWriter) Method

Connect to remote host

Namespace: LiteNetLib
Assembly: NeoAxis.Core (in NeoAxis.Core.dll) Version: 2026.2.1.0 (2026.2.1.0)
Syntax
C#
public LiteNetPeer Connect(
	string address,
	int port,
	NetDataWriter connectionData
)

Parameters

address  String
Server IP or hostname
port  Int32
Server Port
connectionData  NetDataWriter
Additional data for remote peer

Return Value

LiteNetPeer
New NetPeer if new connection, Old NetPeer if already connected, null peer if there is ConnectionRequest awaiting
Exceptions
ExceptionCondition
InvalidOperationExceptionManager is not running. Call Start
See Also