mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
PROJECT: added common library to make common files actually common
- renamed sln to FFXIVClassic.sln - threaded logging - todo: print packets using Log.Packet
This commit is contained in:
parent
16d4779970
commit
c23f9c7ca9
53 changed files with 547 additions and 1817 deletions
|
@ -4,7 +4,7 @@ using System.Net;
|
|||
using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using FFXIVClassic_Lobby_Server.common;
|
||||
using FFXIVClassic.Common;
|
||||
|
||||
namespace FFXIVClassic_Lobby_Server
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ namespace FFXIVClassic_Lobby_Server
|
|||
|
||||
private void socketCleanup()
|
||||
{
|
||||
Log.Debug(String.Format("Cleanup thread started; it will run every {0} seconds.", CLEANUP_THREAD_SLEEP_TIME));
|
||||
Program.Log.Debug(String.Format("Cleanup thread started; it will run every {0} seconds.", CLEANUP_THREAD_SLEEP_TIME));
|
||||
while (!killCleanupThread)
|
||||
{
|
||||
int count = 0;
|
||||
|
@ -40,7 +40,7 @@ namespace FFXIVClassic_Lobby_Server
|
|||
}
|
||||
}
|
||||
if (count != 0)
|
||||
Log.Status(String.Format("{0} connections were cleaned up.", count));
|
||||
Program.Log.Status(String.Format("{0} connections were cleaned up.", count));
|
||||
Thread.Sleep(CLEANUP_THREAD_SLEEP_TIME*1000);
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ namespace FFXIVClassic_Lobby_Server
|
|||
}
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.White;
|
||||
Log.Debug(String.Format("Lobby Server has started @ {0}:{1}", (mServerSocket.LocalEndPoint as IPEndPoint).Address, (mServerSocket.LocalEndPoint as IPEndPoint).Port));
|
||||
Program.Log.Debug(String.Format("Lobby Server has started @ {0}:{1}", (mServerSocket.LocalEndPoint as IPEndPoint).Address, (mServerSocket.LocalEndPoint as IPEndPoint).Port));
|
||||
Console.ForegroundColor = ConsoleColor.Gray;
|
||||
|
||||
mProcessor = new PacketProcessor();
|
||||
|
@ -105,7 +105,7 @@ namespace FFXIVClassic_Lobby_Server
|
|||
conn.socket.BeginReceive(conn.buffer, 0, conn.buffer.Length, SocketFlags.None, new AsyncCallback(receiveCallback), conn);
|
||||
//Queue the accept of the next incomming connection
|
||||
mServerSocket.BeginAccept(new AsyncCallback(acceptCallback), mServerSocket);
|
||||
Log.Status(String.Format("Connection {0}:{1} has connected.", (conn.socket.RemoteEndPoint as IPEndPoint).Address, (conn.socket.RemoteEndPoint as IPEndPoint).Port));
|
||||
Program.Log.Status(String.Format("Connection {0}:{1} has connected.", (conn.socket.RemoteEndPoint as IPEndPoint).Address, (conn.socket.RemoteEndPoint as IPEndPoint).Port));
|
||||
}
|
||||
catch (SocketException)
|
||||
{
|
||||
|
@ -179,7 +179,7 @@ namespace FFXIVClassic_Lobby_Server
|
|||
}
|
||||
else
|
||||
{
|
||||
Log.Status(String.Format("{0} has disconnected.", conn.currentUserId == 0 ? conn.getAddress() : "User " + conn.currentUserId));
|
||||
Program.Log.Status(String.Format("{0} has disconnected.", conn.currentUserId == 0 ? conn.getAddress() : "User " + conn.currentUserId));
|
||||
|
||||
lock (mConnectionList)
|
||||
{
|
||||
|
@ -192,7 +192,7 @@ namespace FFXIVClassic_Lobby_Server
|
|||
{
|
||||
if (conn.socket != null)
|
||||
{
|
||||
Log.Status(String.Format("{0} has disconnected.", conn.currentUserId == 0 ? conn.getAddress() : "User " + conn.currentUserId));
|
||||
Program.Log.Status(String.Format("{0} has disconnected.", conn.currentUserId == 0 ? conn.getAddress() : "User " + conn.currentUserId));
|
||||
|
||||
lock (mConnectionList)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue