Add Disconnect to Client and Server

This commit is contained in:
Sofia 2017-11-25 16:25:41 +02:00
parent b9aacb530b
commit da0fa50323
3 changed files with 7 additions and 0 deletions

View File

@ -65,6 +65,7 @@
<Compile Include="scripts\net\Server.cs" /> <Compile Include="scripts\net\Server.cs" />
<Compile Include="scripts\net\syncing\PacketDistributor.cs" /> <Compile Include="scripts\net\syncing\PacketDistributor.cs" />
<Compile Include="scripts\net\syncing\ConnectionHandler.cs" /> <Compile Include="scripts\net\syncing\ConnectionHandler.cs" />
<Compile Include="scripts\util\DisconnectReason.cs" />
<Compile Include="scripts\util\Optional.cs" /> <Compile Include="scripts\util\Optional.cs" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

View File

@ -38,5 +38,8 @@ namespace Network {
GD.print("Connected to " + conn.Name + " at " + conn.Address + ":" + conn.Port); GD.print("Connected to " + conn.Name + " at " + conn.Address + ":" + conn.Port);
PacketDistributor.AddHandler(ServerConn); PacketDistributor.AddHandler(ServerConn);
} }
public override void Disconnected(Connection conn) {
}
} }
} }

View File

@ -31,5 +31,8 @@ namespace Network {
public override void Connected(Connection conn) { public override void Connected(Connection conn) {
GD.print("Someone connected at " + conn.Address + ":" + conn.Port); GD.print("Someone connected at " + conn.Address + ":" + conn.Port);
} }
public override void Disconnected(Connection conn) {
}
} }
} }