Facepunch.Steamworks Wiki

Steamworks.SteamNetworkingSockets.CreateRelaySocket

Syntax

static T CreateRelaySocket( int virtualport = 0 )

Description

Creates a "server" socket that listens for clients to connect to by calling Connect, over SDR (Steam Datagram Relay) . To use this you should pass a class that inherits ISocketManager or SocketManager. You can use SocketManager to get connections and send messages, but the ISocketManager class will received all the appropriate callbacks.

Arguments

int virtualport 0

Returns

T

More details...

This method should be used to allow people to create a new server using steam relay (Steam Datagram Relay)
It return a SocketManager (create a class that inherit either from the interface or the class) that you should keep to receive/send data to other clients. Also note that SocketManager as a parameter called "Interface" that give you access to the ISocketManager in order to use callbacks.