tModLoader  0.12 Alpha
A mod to make and play Terraria mods
Terraria.Social.Steam.NetSocialModule Class Reference

Inherits Terraria.Social.Base.NetSocialModule.

Inherited by Terraria.Social.Steam.NetClientSocialModule, and Terraria.Social.Steam.NetServerSocialModule.

Public Types

enum class  ConnectionState { Inactive , Authenticating , Connected }
 

Public Member Functions

override void Initialize ()
 
override bool IsConnected (RemoteAddress address)
 
override bool IsDataAvailable (RemoteAddress address)
 
override int Receive (RemoteAddress address, byte[] data, int offset, int length)
 
override bool Send (RemoteAddress address, byte[] data, int length)
 
override void Shutdown ()
 
- Public Member Functions inherited from Terraria.Social.Base.NetSocialModule
abstract void CancelJoin ()
 
abstract bool CanInvite ()
 
abstract void Close (RemoteAddress address)
 
abstract void Connect (RemoteAddress address)
 
abstract ulong GetLobbyId ()
 
abstract void LaunchLocalServer (Process process, ServerMode mode)
 
abstract void OpenInviteInterface ()
 
abstract bool StartListening (SocketConnectionAccepted callback)
 
abstract void StopListening ()
 

Protected Member Functions

 NetSocialModule (int readChannel, int writeChannel)
 
delegate void AsyncHandshake (CSteamID client)
 
P2PSessionState_t GetSessionState (CSteamID userId)
 
virtual void OnLobbyChatMessage (LobbyChatMsg_t result)
 
CSteamID RemoteAddressToSteamId (RemoteAddress address)
 

Protected Attributes

ConcurrentDictionary< CSteamID, ConnectionState > _connectionStateMap = new ConcurrentDictionary<CSteamID, ConnectionState>()
 
Lobby _lobby = new Lobby()
 
SteamP2PReader _reader
 
object _steamLock = new object()
 
SteamP2PWriter _writer
 

Static Protected Attributes

static readonly byte[] _handshake
 
const int ClientReadChannel = 2
 
const ushort GamePort = 27005
 
const int LobbyMessageJoin = 1
 
const ushort QueryPort = 27007
 
const int ServerReadChannel = 1
 
const ushort SteamPort = 27006
 

Member Data Documentation

◆ _handshake

readonly byte [] Terraria.Social.Steam.NetSocialModule._handshake
staticprotected
Initial value:
= new byte[10] {
10,
0,
93,
114,
101,
108,
111,
103,
105,
99
}