Connect Method (IPEndPoint, NetOutgoingMessage)

Lidgren.Network

Collapse imageExpand ImageCopy imageCopyHover image
Connect to a remote server

Namespace: Lidgren.Network
Assembly: Lidgren.Network (in Lidgren.Network.dll) Version: 2012.1.7.0 (2012.1.7.0)

Syntax

C#
public override NetConnection Connect(
	IPEndPoint remoteEndpoint,
	NetOutgoingMessage hailMessage
)
Visual Basic
Public Overrides Function Connect ( _
	remoteEndpoint As IPEndPoint, _
	hailMessage As NetOutgoingMessage _
) As NetConnection
Visual C++
public:
virtual NetConnection^ Connect(
	IPEndPoint^ remoteEndpoint, 
	NetOutgoingMessage^ hailMessage
) override

Parameters

remoteEndpoint
Type: System.Net..::..IPEndPoint
The remote endpoint to connect to
hailMessage
Type: Lidgren.Network..::..NetOutgoingMessage
The hail message to pass

Return Value

server connection, or null if already connected

See Also