Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ OnCreateSessionRequest()

void Terraria.Social.WeGame.NetServerSocialModule.OnCreateSessionRequest ( CreateSessionRequest data)
inlineprivate

Definition at line 117 of file NetServerSocialModule.cs.

118 {
120 {
121 WeGameHelper.WriteDebugString(" - Ignoring connection from " + ((RailComparableID)data.remote_peer).id_ + " while _acceptionClients is false.");
122 return;
123 }
124 if (!_mode.HasFlag(ServerMode.FriendsOfFriends) && !IsWeGameFriend(data.remote_peer))
125 {
126 WeGameHelper.WriteDebugString("Ignoring connection from " + ((RailComparableID)data.remote_peer).id_ + ". Friends of friends is disabled.");
127 return;
128 }
129 WeGameHelper.WriteDebugString("pass wegame friend check");
130 AcceptAnUserSession(data.local_peer, data.remote_peer);
131 _connectionStateMap[data.remote_peer] = ConnectionState.Authenticating;
132 if (_connectionAcceptedCallback != null)
133 {
134 _connectionAcceptedCallback(new SocialSocket(new WeGameAddress(data.remote_peer, "")));
135 }
136 }
bool AcceptAnUserSession(RailID local_peer, RailID remote_peer)
ConcurrentDictionary< RailID, ConnectionState > _connectionStateMap

References Terraria.Social.WeGame.NetServerSocialModule._acceptingClients, Terraria.Social.WeGame.NetServerSocialModule._connectionAcceptedCallback, Terraria.Social.WeGame.NetSocialModule._connectionStateMap, Terraria.Social.WeGame.NetServerSocialModule._mode, Terraria.Social.WeGame.NetServerSocialModule.AcceptAnUserSession(), Terraria.Social.WeGame.NetServerSocialModule.IsWeGameFriend(), and Terraria.Social.WeGame.WeGameHelper.WriteDebugString().

Referenced by Terraria.Social.WeGame.NetServerSocialModule.OnRailEvent().