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

Inherits Terraria.Social.Base.NetSocialModule.

Inherited by Terraria.Social.WeGame.NetClientSocialModule, and Terraria.Social.WeGame.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

RailID GetLocalPeer ()
 
bool GetSessionState (RailID userId, RailNetworkSessionState state)
 
RailID RemoteAddressToRailId (RemoteAddress address)
 

Protected Attributes

ConcurrentDictionary< RailID, ConnectionState > _connectionStateMap = new ConcurrentDictionary<RailID, ConnectionState>()
 
Lobby _lobby = new Lobby()
 
WeGameP2PReader _reader
 
WeGameP2PWriter _writer
 

Static Protected Attributes

static readonly byte[] _handshake
 
const int LobbyMessageJoin = 1
 

Member Data Documentation

◆ _handshake

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